This flag allows to force loading of the library
in the case when for some reason multiple ELF files
share the same filename (because the already-loaded
library has been removed and overwritten, for example).
Change-Id: I798d44409ee13d63eaa75d685e99c4d028d2b0c1
This used to be handled by -fvisibility=hidden on libc_cxa, but that
was broken by the resolution of https://llvm.org/PR22419 (introduced
to Android in today's clang update).
Now we just use a version script that prevents these from being
re-exported from our shared libraries.
Change-Id: Ib290e1d0d7426e09ad17a91178162fff6dbdcfa9
stubs.cpp gets string.h inherited from private/android_filesystem_config.h
it should not rely on this in the future. The intent is to move fs_config
function into libcutils and thus deprecate any need for string.h in this
include file.
Change-Id: I946ec1979ef5bbb34fbcb4a99bf2cd79280bb2a3
These macros are also not used in glibc. And we should use
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP instead.
Change-Id: I35195e2f499712dcde9305bbb93622d0f7ca874b
This is initial implementations; does not yet handle
dlclose - undefined behavior, needs linker support to
handle it right.
Bug: 19800080
Bug: 16696563
Change-Id: I7a3e21ed7f7ec01e62ea1b7cb2ab253590ea0686
It is due to a previous change "Let g_thread_list_lock only protect g_thread_list".
We need to add the newly created thread to thread_list even if
__init_thread fails, so the thread can exit successfully.
Change-Id: I0332df11acfdd181350bcc092b12d90d679057a4
This is a patch testing whether we can use abort() instead of
returning ESRCH for invalid pthread ids. It is an intermediate
step to remove g_thread_list/g_thread_list_lock.
Bug: 19636317
Change-Id: Idd8e4a346c7ce91e1be0c2ebcb78ce51c0d0a31d
For DeathTests, we are testing the output of stderr to check if it is the
death we are expecting. To collect the output, Gtest redirects stderr to
a temporary file. But in __libc_write_stderr in libc_logging.cpp, we are
writing to stderr without a O_APPEND flag, so a new message will overwrite
a previous message.
The above situation makes almost all the DeathTests fail on host. Because
the expected message are always overwritten in host DeathTests. So I add
O_APPEND flag in __libc_write_stderr, which makes all host DeathTests pass.
Change-Id: Ic2f6044fdb181eebe132a6f170b57db43c5c3289
As glibc/netbsd don't protect access to thread struct members by a global
lock, we don't want to do it either. This change reduces the
responsibility of g_thread_list_lock to only protect g_thread_list.
Bug: 19636317
Change-Id: I897890710653dac165d8fa4452c7ecf74abdbf2b
aligned attribute can only control compiler's behavior, but we
are manually allocating pthread_internal_t. So we need to make
sure of alignment manually.
Change-Id: Iea4c46eadf10dfd15dc955c5f41cf6063cfd8536
The errors are introduced in "Make pthread join_state not protected by g_thread_list_lock".
Bug: 19636317
Change-Id: I58ae9711da94bfbac809abfd81311eeb70301a4b
This is currently set in init.rc, but I plan on making init
set PATH to _PATH_DEFPATH and removing the line from init.rc...
Bug: 19564110
Change-Id: Ifa7226a3a5a90d141a788d7d6b1ae86245674218
Bionic's getauxval(...) implementation returns zero when entries are
missing. Zero can be a valid value, so there is no unambiguous way of
detecting an error. Since glibc 2.19, errno is set to ENOENT when an
entry is missing to make it possible to detect this. Bionic should match
this behavior as code in the Linux ecosystem will start relying on it to
check for the presence of newly added entries.
Change-Id: Ic1efe29bc45fc87489274c96c4d2193f3a7b8854
Signed-off-by: Daniel Micay <danielmicay@gmail.com>