History log of /system/core/libutils/VectorImpl.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
22dbf3947fedf988e714a4703ddf85fc41413f90 01-Mar-2017 Mathias Agopian <mathias@google.com> clean-up libutils includes

moved Foo.h as first include of Foo.cpp, and
removed redundant includes.

Made NativeHandle non virtual.


Test: run & compile
Bug: n/a

Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a
/system/core/libutils/VectorImpl.cpp
30f991f251940be3ed11566fb71139852286f68a 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h when utilizing ALOG macros

Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
/system/core/libutils/VectorImpl.cpp
66ce3e08c5632a20ea66bde6dd76397041edf034 28-Sep-2016 Mark Salyzyn <salyzyn@google.com> system/core Replace cutils/log.h with android/log.h

Should use android/log.h instead of cutils/log.h as a good example
to all others. Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
/system/core/libutils/VectorImpl.cpp
c565bdb67b801fe2b4965b44e53dccfd9097993c 23-Sep-2015 Sergio Giro <sgiro@google.com> am f777655d: resolved conflicts for 6ee734cf to stage-aosp-master

* commit 'f777655d85af3aefa4a1683f289da1ec67988330':
libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
d2529f28308ba7583f4d8baaa937218d81cbe8bd 23-Sep-2015 Sergio Giro <sgiro@google.com> libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory

Some methods in header files of classes using SharedBuffer need
to be moved to the implementation files accordingly

Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db
/system/core/libutils/VectorImpl.cpp
51e740f802083cc250a2f6228222bcbbcec79887 08-Sep-2015 Narayan Kamath <narayan@google.com> resolved conflicts for 32d86587 to mnc-dr-dev-plus-aosp

Change-Id: I381133e7dd93f908bd3d2b42e8af83d954e428af
c609c31fb56ae434caa2d0153cd0a2f74a715071 28-Aug-2015 Narayan Kamath <narayan@google.com> libutils: Fix integer overflows in VectorImpl.

Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
/system/core/libutils/VectorImpl.cpp
c76698f24e785a8984fa9d9d0bf8f81aa28746cc 28-Aug-2015 Nick Kralevich <nnk@google.com> VectorImpl.cpp: fix benign multiplication overflow

j is a ssize_t, which can go negative. If it goes negative,
the resulting multiplication of mItemSize*j doesn't make
any sense. Since the value is never used, just don't perform
the calculation if j < 0.

Bug: 23607865
Change-Id: I14f6f6506645d582f7d67a2e2d60ead3cb18b957
/system/core/libutils/VectorImpl.cpp
1f286989986a384e34d9de1acf8899439506695a 22-Aug-2015 Nick Kralevich <nnk@google.com> libutils: cleanups for -fsanitize=integer

* Hashing functions rely on integer overflow behavior.
Mark those functions as safe.

* abort() if a passed in size_t value is greater than
UINT32_MAX. This can occur on 64 bit builds where size_t
is larger than uint32_t.

* Special case the index lookup for an empty sorted vector.
Without the special case, size() == 0, and size()-1 underflows.

Change-Id: I343a14b589fc8f0d221c1998ae5d6f0b9e2781f8
/system/core/libutils/VectorImpl.cpp
eb0eb4f79fca083009aa7a6b6e28ddcdbcbd1214 17-Oct-2013 Shuo Gao <shuo.gao@intel.com> fix corruption in Vector<> when malloc falied

1. When alloc or realloc failed in the function SharedBuffer::editResize,
it would return a NULL pointer, then mStorage would update to be 1 by
SharedBuffer::data() if no pointer check here, which is an obviously
wrong address, and would cause corruption when used it e.g. in capacity().

So add the pointer check here for the return value of SharedBuffer::editResize,
if it's NULL do not use it to update mStorage, to avoid the value of mStorage
polluted.

2. when alloc or realloc falied in _grow & _shrink function, mStorage keep
the original value, so mCount should not be updated here.

Otherwise, mStorage might be 0 but mCount>0, so a corruption would happend
when it try to delete items from the Vector since mCount>0.

Change-Id: I7c3814e843c459834ca5eed392e8d63d1cb7d2d8
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 139626
/system/core/libutils/VectorImpl.cpp
d98e07fdf9c338589f263c47ce5c844ed43efad5 02-Aug-2013 Alex Ray <aray@google.com> move libs/utils to libutils

Change-Id: I6cf4268599460791414882f91eeb88a992fbd29d
/system/core/libutils/VectorImpl.cpp