When setting a repeat timer using the SIGEV_THREAD mechanism, it's possible
that the callback can be called after the timer is disarmed or deleted.
This happens because the kernel can generate signals that the timer thread
will continue to handle even after the timer is supposed to be off.
Add two new tests to verify that disarming/deleting doesn't continue to
call the callback.
Modify the repeat test to finish more quickly than before.
Refactor the Counter implementation a bit.
Bug: 18039727
(cherry pick from commit 0724132c32)
Change-Id: I135726ea4038a47920a6c511708813b1a9996c42
replace lseek() and use pread() instead
add test for library_fd_offset > file_size case
Bug: 17762003
Change-Id: I4555f0be635124efe849c1f226985bcba72ffcbd
Unless we completely redo how we build bionic (so that the object
files for libc.so get built separately from libc.a), we can't enable
ASAN here, as libc.a gets linked into static executables.
Change-Id: I2ce4f51248bd51c4213a555ff481b6faabbf53f8
- Clean up the labels (add .L to make them local).
- Change to using cfi directives.
- Fix unwinding of the __memcpy_chk fail path.
Bug: 18033671
Change-Id: I12845f10c7ce5e6699c15c558bda64c83f6a392a
Any pre-C++11 clients of stdatomic.h that use libc++ are being forced
over to <atomic>, which they don't have the language support to use.
Change-Id: I62445c1f2541410a1569498c09433c7196635537
All we're actually interested in is the unwinder. Since that's now a
separate library, just use that.
Change-Id: If86071a0d850da961336a58147b70369ace7bd12
Add the missing prototypes, fix the existing prototypes to use clockid_t
rather than int, fix clock_nanosleep's failure behavior, and add simple
tests.
Bug: 17644443
Bug: https://code.google.com/p/android/issues/detail?id=77372
Change-Id: I03fba369939403918abcabae9551a7123953d780
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
The mallinfo usmblks value returned by dlmalloc is a little misleading.
It's not the current max, it's the historical high water mark. This
leads to dumpsys meminfo producing native memory numbers that don't add up.
Change this to the real total footprint, not this high water mark.
Bug: 17265653
(cherry pick from commit f4ada9c9ce)
Change-Id: I2fba10285859dccfe8331063c9be14cc169f2d91
valgrind seems to mess with the stack enough that the kernel will
report "[stack:pid]" rather than "[stack]" in /proc/self/maps, so
switch to the task-specific file instead to force "[stack]". (There
are two conditions in the kernel code that decides which form to
output.)
Bug: 17897476
Change-Id: Iff85ceb6d52e8716251fab4e45d95a27184c5529
It turns out that appportable has a version that calls dlmalloc directly.
Re-add the dlmalloc symbol for 32 bit only as a compatibility shim that
calls malloc.
Bug: 17881362
(cherry pick commit from c9734d24d9)
Change-Id: Iee9a777f66a1edb407d7563a60792b767ac4f83a
This change should probably be made upstream as well, but they have a
note about not using it because it isn't available on all systems.
Change-Id: I6d8404c031bd2f486532ced55d94bbb4a4cd2e71
Use $(BUILD_SYSTEM)/base_rules to build it as custom module, so that
it's exposed to utilities like mm/mmma etc.
Bug: 17887283
Change-Id: Idd7b62d08e4d56331a3ff15da6aa46eae8c41898