The pthread_mutex_lock and pthread_mutex_unlock were allowed to
fail silently on L 32 bit devices when passed a NULL. We changed
this to a crash on 32 bit devices, but there are still games that make
these calls and are not likely to be updated. Therefore, once again
allow NULL to be passed in on 32 bit devices.
Bug: 19995172
Change-Id: If7e8860075ecd63c0064d80f64e226fad7bd3c26
The functions dlmalloc_inspect_all and dlmalloc_trim get
exported on devices that use dlmalloc, so be consistent and
export them everywhere.
Bug: 21640784
(cherry picked from commit f9554a1776)
Change-Id: I1000221423c16c356bb6301e55f726db01c3f209
These are the problems fixed in this CL:
- The ndk_cruft.cpp file was not compiled for 64 bit.
- Some files where not compiled for libc_bionic.a due to a missing
patch-up-arch-specific-flags call.
- The libc_bionic_ndk.a patch up call was using bionic src, not
the bionic_ndk_src_files.
- Move mmap.cpp to the ndk src list where it was before because of
the above errors.
Bug: 21640784
(cherry picked from commit 19fee2ca8b)
Change-Id: Ib9a9cfd72720586d3400b11cd7189f021e9a06c6
It turns out that apportable apps expect that the DIR structure is
the same as in L and below. Modify the structure to have the same
order, and move the new variable to the end of the structure.
Bug: 21037208
Change-Id: Id1258e9dc19423109a2c3a8086d3022965591166
Do not skip RTLD_LOCAL libraries in dlsym(RTLD_DEFAULT, ...)
if the library is opened by application with target api level <= 22
Bug: http://b/21565766
Bug: http://b/17512583
Change-Id: Ic45ed1e4f53e84cba9d74cab6b0049c0c7aa8423
Bug: 19482626
"ulimit -c xxx" command may run before bionic-unit-tests.
Make sure sys_resource test fails gently in that case.
Change-Id: Ic3b5ed8b20acba56df8c5ef082c88e5050e761aa
(cherry picked from commit 4853f40f3f)
Support O_PATH file descriptors when handling fgetxattr and fsetxattr.
This avoids requiring file read access to pull extended attributes.
This is needed to support O_PATH file descriptors when calling
SELinux's fgetfilecon() call. In particular, this allows the querying
and setting of SELinux file context by using something like the following
code:
int dirfd = open("/path/to/dir", O_DIRECTORY);
int fd = openat(dirfd, "file", O_PATH | O_NOFOLLOW);
char *context;
fgetfilecon(fd, &context);
This change was motivated by a comment in
https://android-review.googlesource.com/#/c/152680/1/toys/posix/ls.c
(cherrypicked from commit 2825f10b7f)
Change-Id: Ic0cdf9f9dd0e35a63b44a4c4a08400020041eddf
This applies for apps targeting sdk<=22 and
only for lp32 platforms.
Bug: http://b/21364029
Change-Id: I903e81c9ccda2a8beaba1d132d68c77d30a4cdb2
(cherry picked from commit d974e88046)
Linker used to skip RTLD_NEXT within local_group when
caller->next is nullptr (which represents load order
but not the order within local_group dependency tree)
Bug: http://b/21380474
Change-Id: I178fc4657b19bceb871635b177c1df67855b1708
(cherry picked from commit b96ac41b32)
This test has lost its purpose as we are using mmap/munmap for pthread_internal_t. And it is a flaky test.
Bug: 21205574
Bug: 20860440
Change-Id: I7cbb6bc3fd8a2ca430415beab5ee27a856ce4ea7
(cherry picked from commit 2957cc5f10)
All arch-arm and arch-arm64 .S files were compiled
by gcc with and without this patch. The output object files
were identical. When compiled with llvm and this patch,
the output files were also identical to gcc's output.
BUG: 18061004
Change-Id: I458914d512ddf5496e4eb3d288bf032cd526d32b
(cherry picked from commit 33f33515b5)
According to the comments in Posix_close(), TEMP_FAILURE_RETRY() should
not be used with close():
462bdac45c%5E%21/#F12
Kill ScopedFd by simplifying the single caller.
Bug: http://b/20501816
Change-Id: I248c40b8c2fc95f1938a6edfc245c81847fc44af
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
(cherry picked from commit 0346ad7a4f)
Answers the question: what if dependent library
was preloaded with RTLD_LOCAL flag.
Also add test for RTLD_NEXT within local_group.
Bug: http://b/17512583
Change-Id: I79e081e68b3a8c0ed8980d4275a06515fea94ec9
(cherry picked from commit 697bd9fd38)
There's no reason to have multiple years in our own copyright headers,
and given the stupidity of our NOTICE file generation, it just creates
more junk.
Change-Id: I065a3811c2e2584e3b649a18ad9460286bc72b92
(cherry picked from commit c69ace87ec)
It is partically cherry-pick from https://android-review.googlesource.com/#/c/123410/.
And as lollipop-mr1-cts-dev still uses stlport, <stdatomic.h> is used instead of <atomic>.
Bug: 20677618
Change-Id: I952a6fd074facc4227c955fecf3ecbfbbaec4193