Age | Commit message (Collapse) | Author |
|
Move tests in the same directory as the corresponding code, so it's
easier to see what is/isn't tested.
Fix naming of libcutils_tests (plural) to match the singular that's more
common (even though the plural makes more sense to me).
Add these two to system/core/'s TEST_MAPPING.
Remove obsolete AndroidTest.xml.
Fix a flaky (timing-dependent) libcutils test.
Test: ran tests
Change-Id: I7e0a31ff45c8a152562bf66fc97161594249366e
|
|
Bug: http://b/119818070 "app crashes when reading asset of zero length"
Test: ran tests
Change-Id: Idd2ad6f6e72c8e445aff78a460fac96dea41c950
|
|
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
|
|
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
|
|
* Move -Wall -Werror from cppflags to cflags.
* Fix/suppress warning on unused variables.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
|
|
In the original code when target is an empty string
strlen16() would start reading the memory until a
"terminating null" (that is, zero) character is found.
This may happen because "*target++", at line 300,
would increment the pointer beyond the actual string.
Signed-off-by: Branislav Rankov <branislav.rankov@arm.com>
Signed-off-by: Tamas Petz <tamas.petz@arm.com>
Test: libutils_tests --gtest_filter=UnicodeTest.strstr16*
Change-Id: I213ffe061057c7fa8f34b68881e106a709557dcd
|
|
Now in Android.bp files, target.linux applies to all targets running a
linux kernel (android, linux_glibc, linux_bionic). So common
flags/sources/etc can be combined instead of copying them to each
target.
Test: m
Change-Id: If7ad138ea1c540c160731f86b6ccc0daa5c69b83
|
|
In the future, target.linux will apply to all targets running a linux kernel
(android, linux_glibc, linux_bionic). So move all current users to the specific
linux_glibc.
There will be another cleanup pass later that will move some instances back to
target.linux if the properties should be shared with target.android and
target.linux_bionic, but target.linux needs to be removed first.
Test: out/soong/build.ninja identical before/after
Change-Id: I72ef34689c60ce547cab2898e354b027e335f6a1
Exempt-From-Owner-Approval: build system cleanup
|
|
libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults
for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on
Linux.
Test: m host
Change-Id: I0b3c147b00a8ab6ff289b85db55b88836c905f5c
Exempt-From-Owner-Approval: build system cleanup
|
|
am: e7ce8c8485
Change-Id: I4963b623b6e5a190bfee1dcfec01fe009ba0e94f
|
|
Enable thread safety analysis annotations for clang.
See https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
for instructions on using these in the source code.
Bug: 28094863
Test: annotated
frameworks/native/services/inputflinger/InputDispatcher.cpp
and enabled '-Werror' and '-Wthread-safety' clang
compiler flags in Android.bp for inputflinger.
Observed compiler errors when accessing
instance attributes without holding a lock. Also added
a compile test Mutex_test.cpp, which can be build using
m libutils_tests and run using
/data/nativetest64/libutils_tests/libutils_tests
Change-Id: I24ce111241cc339901bc45dda8b446df5299af4a
|
|
it has moved to libEGL which was the only client.
Test: compiled & Run
Bug: vndk-stable
Change-Id: Ife18727fa1c48b1be6910058867016348b7f02c1
|
|
Test accessing a singleton from two libraries, the second of which
depends on the first but is dlopen'd after the first is already
loaded.
Bug: 35674422
Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
Change-Id: I975ba933a19b941a52bdb6e9c221a6910ffb8081
|
|
Reapply of Icd5f39ae71b57167e9b2fe7ec09c5400bcb90e78 with
RefBase_test.cpp and Looper_test.cpp removed from mac builds.
Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
Test: out/host/darwin-x86/nativetest64/libutils_tests/libutils_tests
Change-Id: I5979b296a8500b5697d94d64fc441363047adcea
|
|
Fails mac build: "system/core/include/utils/Looper.h:25:10: fatal error: 'sys/epoll.h' file not found"
This reverts commit afa891e85e7d8f852d0eab706d44226b6fdfedd1.
Change-Id: Ib558b8f5a303b55ab32a399d338d8aac0fae32b2
|
|
Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
Change-Id: Icd5f39ae71b57167e9b2fe7ec09c5400bcb90e78
|
|
StrongPointer_test.cpp's Foo was colliding with RefBase_test.cpp's
Foo.
Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
from later CL
Change-Id: I2a4e956c88a07cec72d7ce734cf06c58134a4235
|
|
If we don't output to stderr too, not only is it annoying to shell users (who
won't see anything), it prevents us from writing better gtests that actually
make assertions about the assert message.
Bug: http://b/23675822
Test: libutils tests still pass
Change-Id: I62b3144c385cba4dde485f0b0f9b42aeaef51e9a
|
|
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
|
|
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.
Correcting the length computation and adding bound checks to the
conversion functions.
Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e46d2e1074d1a365e232af0dcedd6a1)
|
|
String16(const char *utf8) now returns the empty string in case
a string ends halfway throw a utf8 character.
Bug: 29267949
Clean cherry-pick from 1dcc0c82394ec9cd6887c7ca39f9b5024db01ac9
Change-Id: I5223caa7d42f4582a982609a898a02043265c6d3
|
|
|
|
This prevents two different kinds of client errors from causing
undetected memory corruption, and helps with the detection of others:
1. We no longer deallocate objects when the weak count goes to zero
and there have been no strong references. This otherwise causes
us to return a garbage object from a constructor if the constructor
allocates and deallocates a weak pointer to this. And we do know
that clients allocate such weak pointers in constructors and their
lifetime is hard to trace.
2. We abort if a RefBase object is explicitly destroyed while
the weak count is nonzero. Otherwise a subsequent decrement
would cause a write to potentially reallocated memory.
3. We check counter values returned by atomic decrements for
plausibility, and fail immediately if they are not plausible.
We unconditionally log any cases in which 1 changes behavior
from before. We abort in cases in which 2 changes behavior, since
those reflect clear bugs.
In case 1, a log message now indicates a possible leak. We have
not seen such a message in practice.
The third point introduces a small amount of overhead into the
reference count decrement path. But this should be negligible
compared to the actual decrement cost.
Add a test for promote/attemptIncStrong that tries to check for
both (1) above and concurrent operation of attemptIncStrong.
Add some additional warnings and explanations to the RefBase
documentation.
Bug: 30503444
Bug: 30292291
Bug: 30292538
Change-Id: Ida92b9a2e247f543a948a75d221fbc0038dea66c
|
|
am: 6dc68cb5f9
Change-Id: I5a010465364b6e14423b19e8c0f9cffa58ee3152
|
|
* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.
Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
|
|
am: 896c6b14ae
Change-Id: If8223e90988510385378506cd3a05d382ab73fc9
|
|
Create objects of type KeyedEntry for lookups that only have
a key reference
Bug: 27567036
Change-Id: I5e609a3db63d3b9277ff1547a3cca37dce70251c
|
|
am: dc9fbc3440
Change-Id: I77ead7f91c17ee8c5614da783152ac3478fc5342
|
|
Add some basic tests for RefBase, as well as a more ambitious memory
ordering test.
Add a README.txt with instructions to run the tests.
Comment out a couple of BlobCache tests that failed consistently and
appeared to be incorrect. With that fix, I managed to run
libutils_tests successfully on device.
Bug: 28705989
Change-Id: I8ad29995097a149a0cc38615d6ed37117ec6cb5c
|
|
Change-Id: I5a7faca3249f0c038914540b1dd29edf0084c0e1
|
|
Change-Id: I8b578f671f92246aca61f98937d75a60b56bc5c6
|
|
am: a91a1a990f
* commit 'a91a1a990f1d629377dcd2c3f2b57ccab48dc8cf':
SystemClock: add test
Change-Id: I547a4c3422eb468530e3cdd02eb2bb157a444a15
|
|
manual_merge_8b452b8
Change-Id: Iacdc2d521f669661b4979c03b0476512abdb37c7
|
|
These are needed for aapt to find javadoc comments that contain
"@removed" in order to skip them when printing styleable docs.
Bug: 28663748
Change-Id: I8866d2167c41e11d6c2586da369560d5815fd13e
|
|
Bug: 28357356
Change-Id: Idf66c048bda09cd8cb08adf89ed0edd3770c4e39
Signed-off-by: Greg Hackmann <ghackmann@google.com>
|
|
am: e71b914775
* commit 'e71b9147756ab4da306e4c16461ad23936769603':
system/core: Make Thread::run threadName argument required
|
|
Bug: 27557176
Change-Id: Iae83a1e5489c86c2858fc8481f246b8480f0eec4
|
|
bba2151b29
am: 65df16b05f
* commit '65df16b05f8d590e1fccc19e9a28833d6a71567d':
system/core/lib[c]utils: Fix signedness comparison warnings.
|
|
* Store the output of a length variable in size_t.
* Annotate unsigned constant values as such.
Bug: 27384813
Change-Id: I8504c0a8f5840d4d42e5c0df797a4e5d02d13eb9
|
|
b0df9dca7c am: e483305e47
am: a96cd36afb
* commit 'a96cd36afbff682e24365092dd85bbe9c9165afc':
libutils: fix cache removal when callback invalidates the key
|
|
Bug: 24785286
Change-Id: I9d17d2247258a56ef7776b3a701389e825a9c533
|
|
am: a573d6b186
* commit 'a573d6b18686266667c8efd9d7291ecd28efa67c':
Teach sp<> how to std::move
|
|
am: 518d043c86
* commit '518d043c8693835061b02ecbbee4b82fc61a776e':
Teach sp<> how to std::move
|
|
Arguably we should migrate to std::shared_ptr
but for now make std::vector<sp<>> a bit less
horrible
Change-Id: Ia458a2daff0b656b2f3310b3ea100565ec844c69
|
|
LruCache"
* commit '51209a8b93d85f8b7f3b6a106c41c1aa03190f2c':
system/core: fix iterator for LruCache
|
|
* commit 'f83766079e248e04065103a4720364c0193777ee':
system/core: fix iterator for LruCache
|
|
Was failing to return the first element
Change-Id: Ic803f5d463a56519212014d0d190407cf4b859cf
|
|
Towards deprecation of SharedBuffer
Change-Id: Id6d1c8637583df38b6f28398b6804d9c1e96472a
(cherry picked from commit f84a4906fa950a238e8775a8c931e07632f6023d)
|
|
* commit 'bdae9bf2ec3bbf8e33a34caa412bd8fd7bc2d434':
system/core: remove BasicHashtable
|
|
This reverts commit 5cf2d5c9cc7d3a582154c93ebc4fd7fc7584ded0.
Change-Id: Ifcffff034d4610c0d318cf67b0d98a28551c9605
|