| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
jemalloc now uses a single key pointing to a structure rather
than multiple keys.
Change-Id: Ib76185a594ab2cd4dc400d9a7a5bc0a57a7ac92d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous implementation of rwlock contains four atomic variables, which
is hard to maintain and change. So I make following changes in this CL:
1. Add pending flags in rwlock.state, so we don't need to synchronize
between different atomic variables. Using compare_and_swap operations
on rwlock.state is enough for all state change.
2. Add pending_lock to protect readers/writers waiting and wake up
operations. As waiting/wakeup is not performance critical, using a
lock is easier to maintain.
3. Add writer preference option.
4. Add unit tests for rwlock.
Bug: 19109156
Change-Id: Idcaa58d695ea401d64445610b465ac5cff23ec7c
|
|
|
|
|
| |
Bug: 19995392
Change-Id: I497c512648fbe66257da3fb3bcd5c9911f983705
|
|
|
|
| |
Change-Id: Ibd42ebc387c2bf3eba9aa96091770915b4b34184
|
|
|
|
|
| |
Bug: 19625804
Change-Id: I57ec4c965067dc0c157c795c1f7217a3ca403286
|
|
|
|
| |
Change-Id: I1e1bc77c0e7879baead6c3417282ce549a1153b5
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I20dfb9d3cdc40eed10ea12ac34f03caaa94f7a49
|
|/
|
|
|
| |
Bug: 17177189
Change-Id: Ie1f5d7af359d31b14f58e53ec89c72111362d7ec
|
|
|
|
| |
Change-Id: I1e47291d4476bd2816138a8cf58f29d4986d39e3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found by the toybox id(1) which calls both getpwuid(3) and getgrgid(3) before
looking at either result. The use of a shared buffer in this code meant that
even on a single thread, the data for any of the passwd functions would be
clobbered by the data for any of the group functions (or vice versa).
This might seem like an insufficient fix, but POSIX explicitly says (for
getpwnam) that the result "might be overwritten by a subsequent call to
getpwent(), getpwnam(), or getpwuid()" and likewise for other members of
that group, plus equivalent text for the group-related functions.
Change-Id: I2272f47e91f72e043fdaf7c169fa9f6978ff4370
|
|
|
|
|
| |
Bug: 18723085
Change-Id: Iba2c834b350e4cdba0b2d771b221560a3e5df952
|
|
|
|
|
|
| |
Be safe by default.
Change-Id: I6c4a3f1fd4eee3a651b3162ce95b7e873de57521
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX specifies that pthread_kill(3) and pthread_sigmask(3) are
supposed to live in signal.h rather than pthread.h.
Since signal.h now needs pthread_t and pthread_attr_t, I've moved
those defintions into include/machine/pthread_types.h to keep the
namespace clean. I also sorted some includes. The combination of these
two things seems to have exploded into a cascade of missing includes,
so this patch also cleans up all those.
Change-Id: Icfa92a39432fe83f542a797e5a113289d7e4ad0c
|
|
|
|
| |
Change-Id: I02a0a1c0ae55ccb5c45d17fb99a09c374d71def4
|
|
|
|
|
|
|
|
|
| |
Make the definition of DISALLOW_COPY_AND_ASSIGN conditional. This is
so that the projects that include libnativehelper and bionic macros
do not have to be careful in which order those projects are included.
Bug: 18334516
Change-Id: Ib12a2c2b7ad2e360edcf3b26cb1be626540fadc1
|
|
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=76088
Change-Id: I4a0561b23e90312384d40a1c804ca64ee98f4066
|
|
|
|
|
| |
Bug: 17476168
Change-Id: Id642987e641de81e914a28daea4ffe9d11e090ed
|
|
|
|
|
|
|
|
|
| |
Enable the -std=gnu++11 flag for libstdc++ static and
dynamic libs.
ScopeGuard uses DISABLE_ macros instead of '= delete';
Change-Id: I07e21b306f95fffd49345f7fa136cfdac61e0225
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the problem with symbol search order
for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
and ld_preloads in correct order.
Bug: https://code.google.com/p/android/issues/detail?id=74255
Change-Id: If1ba5c807322409faa914e27ecb675e2c4541f0d
Attempt: 2
|
|
|
|
|
|
| |
This reverts commit a3ad450a2e3fb6b3fe359683b247eba20896f646.
Change-Id: Ia2b838ad2159c643b80c514849582f4b4f4f40e5
|
|
|
|
|
|
|
|
|
| |
This patch fixes the problem with symbol search order
for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
and ld_preloads in correct order.
Bug: https://code.google.com/p/android/issues/detail?id=74255
Change-Id: I4cf84c70dbaabe99310230dfda12385ae5401859
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)
It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.
This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.
Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Change-Id: I1d4dbffe7bc7bda1d353c3a295dbf68d29f63158
|
|
|
|
|
| |
Bug: 16872067
Change-Id: I2b622f252c21ce1b344c040f828ab3f4bf9b6c0a
|
|
|
|
|
|
|
|
| |
Removes the leading underscores from __android_set_abort_message() and
moves its declaration into a public header file.
Bug: 17059126
Change-Id: I470c79db47ec783ea7a54b800f8b78ecbe7479ab
|
|
|
|
|
| |
Bug: 11156955
Change-Id: I6cddc868d1c6503e30f1ffcf460f45670631d64a
|
|
|
|
| |
Change-Id: I7e0bf29bc1a480e9be0d1ae573ca1063d90d82ff
|
|
|
|
|
|
|
|
|
|
| |
bionic_systrace.h contains an implementation of tracing that
can be used with systrace.py and its associated viewer. pthread_mutex
now uses this tracing to track pthread_mutex contention, which can be
enabled by using the "bionic" command line option to systrace.
Bug: 15116468
Change-Id: I30ed5b377c91ca4c36568a0e647ddf95d4e4a61a
|
|
|
|
|
| |
Bug: 15765976
Change-Id: Ibd9cf07067ec8dffe9fda6c3d498d4ab90708220
|
|
|
|
|
|
|
| |
The getentropy_linux.c is lightly modified to build on Android, but we're now
completely in sync with upstream OpenBSD's arc4random implementation.
Change-Id: If32229fc28aba908035fb38703190d41ddcabc95
|
|
|
|
|
|
|
| |
Also remove __bionic_name_mem which has exactly one caller, and is only
ever expected to be used in this one place.
Change-Id: I833744f91e887639f5b2d1269f966ee9032af207
|
|
|
|
|
|
|
|
|
|
| |
There were two bugs here:
- For 64 bit values, this did not properly round up.
- The macro rounded to the power of 2 less than value, not to the power
of 2 greater than value.
Change-Id: If8cb41536a9d2f5c1bc213676f1e67a7903a36b0
|
|
|
|
|
|
| |
Bug: 11156955
Bug: 15291317
Change-Id: I664f25cce7c17085a101d6593d8e01525a1f6a90
|
|
|
|
| |
Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's okay for a program to choose to drag in stdio, but it's unfortunate
if even the minimal "int main() { return 42; }" drags in stdio...
This brings the minimal static binary on ARM down from 78KiB to 46KiB.
Given that we don't have a separate -lpthread it's not obvious to me that
we can shave this down any further. I'm not sure whether this is a worthwhile
change for that reason. (And the fact that dynamic binaries, the usual case,
are unaffected either way.)
Change-Id: I02f91dcff37d14354314a30b72fed2563f431c88
|
|
|
|
|
|
|
|
| |
* This patch enables dlopen by file descriptor
instead of path/name.
Bug: 15984217
Change-Id: Ib39051e00567fb97070bf96d8ce63993877c0a01
|
|
|
|
|
|
|
|
|
|
| |
This is actually revision 1.33, which is no longer the latest, but it's
as close to head as we can currently reasonably get. I've also switched
to the OpenBSD getentropy_linux.c implementation of getentropy, lightly
modified to try to report an error on failure.
Bug: 14499627
Change-Id: Ia7c561184b1f366c9bf66f248aa60f0d53535fcb
|
|
|
|
|
| |
Bug: 11156955
Change-Id: Ib98d837b56cbbdfd01687cb3054fe3103eec0da9
|
|
|
|
|
| |
Bug: 15590152
Change-Id: I730636613ef3653f68c5ab1d43b53beaf8e0dc25
|
|
|
|
|
|
|
|
|
|
| |
This allows an easier way to share config parameters between unit tests
and the bionic code.
It also fixes a problem where the 32 bit bionic tests based on glibc, or
the cts list executable did not have the pvalloc,valloc tests.
Change-Id: Ib47942cb8a278252faa7498a6ef23e9578db544f
|
|
|
|
|
|
|
|
| |
mbrtoc32 and c32rtomb get their implementations from mbrtowc and wcrtomb. The
wc functions now simply call the c32 functions.
Bug: 14646575
Change-Id: I49d4b95fed0f9d790260c996c4d0f8bfd1686324
|
|
|
|
|
|
|
| |
futex(2) can return non-zero successes.
Bug: 15195455
Change-Id: I7818bc922a5a2df31228ff72c169320b5e69a544
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem with the original patch was that using syscall(3) means that
errno can be set, but pthread_create(3) was abusing the TLS errno slot as
a pthread_mutex_t for the thread startup handshake.
There was also a mistake in the check for syscall failures --- it should
have checked against -1 instead of 0 (not just because that's the default
idiom, but also here because futex(2) can legitimately return values > 0).
This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to
pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) >
sizeof(uintptr_t), so we could potentially clobber other TLS slots too.)
I've also rewritten the LP32 compatibility stubs to directly reuse the
code from the .h file.
This reverts commit 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4.
Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ced906c849704f379d7191822f6d74993d4fa296.
Causes issues on art / dalvik due to a broken return value
check and other undiagnosed issues.
bug: 15195455
Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
|
|
|
|
|
|
|
| |
Also stop exporting 'futex'.
Bug: 12250341
Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
|
|
|
|
|
|
|
|
|
|
| |
Also hide part of the system properties compatibility code, since
we needed to touch that to keep it building.
I'll remove __futex_syscall4 and futex in a later patch.
Bug: 11156955
Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
|
|
|
|
|
|
|
|
|
|
|
|
| |
To use jemalloc, add MALLOC_IMPL = jemalloc in a board config file
and you get the new version automatically.
Update the pthread_create_key tests since jemalloc uses a few keys.
Add a new test to verify memalign works as expected.
Bug: 981363
Change-Id: I16eb152b291a95bd2499e90492fc6b4bd7053836
|
|
|
|
|
|
| |
Remove the separate syscall for accept() and implement it as accept4(..., 0).
Change-Id: Ib0b8f5d7c5013b91eae6bbc3847852eb355c7714
|
|
|
|
|
|
|
|
|
|
| |
If libnetd_client can't be found, operate as before and use the default netId
potentially overriden by a more specific netId passed in to
android_get*fornet().
(cherry picked from commit 559c7842cc6862568d9b5799fc0bcf74d58b596b)
Change-Id: I42ef3293172651870fb46d2de22464c4f03e8e0b
|
|
|
|
|
|
|
|
|
|
| |
+ Name the dispatch header correctly (NetdClientDispatch.h).
+ Hide the global dispatch variable (__netdClientDispatch).
+ Explain why it's okay to read the variable without locking.
+ Use quotes instead of angle-brackets for non-system includes.
+ Add necessary declarations for C compiles (and not just C++).
Change-Id: Id0932165e71d81da5fce77a684f40c2263f58e61
|