| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* Pre-lollipop mmap would not care whether offset was signed
or unsigned.
* Lollipop adds 64-bit support which results in sign extension
of offset, causing a negative offset when
a positive offset > 2^31 is given.
Change-Id: I5d19d898fc131cf848217974915d1b466a474f99
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When process is consuming memory beyond the limit specified by
property, it will print all the allocations of the same process.
To enable this feature, do following steps:
1. libc.debug.malloc 40
2. libc.debug.malloc.program <PROCESS_NAME>
3. libc.debug.malloc.maxprocsize <VALUE_IN_BYTES>
4. libc.malloc.minalloclim <VALUE_IN_BYTES>
Change-Id: I03a4de9643ec954802b26443ce5685975ea30f89
|
|
|
|
|
|
|
|
| |
Also make the code thread-safe with lock.
Bug: 20666100
Change-Id: I0f331a617b75280f36179c187418450230d713ef
(cherry picked from commit 166112531558a1d4ea179c29147f27db7045db22)
|
|
|
|
|
|
|
|
|
|
|
| |
If a map has a non-zero vaddr then it needs to be added to the
computed relative offset.
Bug: 22532054
(cherry picked from commit 70b6e1daffd58ebce006d4b504cd0fb9672b6d07)
Change-Id: I1e98741d6ff3b5bbb7fc5f88cc85b27ace75ee2e
|
|
|
|
|
|
|
|
|
|
| |
There is a deadlock if holding the hash table lock while trying to do
a backtrace. Change the code so that the hash table lock is only held
while actually modifying either g_hash_table, or while modifying an
entry from g_hash_table.
Bug: 22423683
Change-Id: I604ea56f940f22e99da41ea4dcdf97bedaac268d
|
|
|
|
|
|
|
|
|
|
| |
1. Personality parameter should be unsigned int (not long)
2. Do not reset bits outside of PER_MASK when setting
personality value.
3. Set personality for static executables.
Bug: http://b/21900686
Change-Id: I4c7e34079cbd59b818ce221eed325c05b9bb2303
|
|
|
|
|
|
| |
Bug: http://b/21858067
Change-Id: Iaa83a5e17cfff796aed4f641d0d14427614d9399
(cherry picked from commit b1304935b64ffcd59cd787cc9ac83a2d14dc587b)
|
|
|
|
|
|
| |
Bug: http://b/19647373
Change-Id: I10e7682d9cec26a523f1a3597ca5326c3ca42ebe
(cherry picked from commit 1801db3d3fe17df543e721b9fb355e5c882dc6cc)
|
|
|
|
|
|
|
|
|
|
|
| |
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 f9554a17765fd91d97d1f74913a626f01e880cee)
Change-Id: I1000221423c16c356bb6301e55f726db01c3f209
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 2825f10b7f61558c264231a536cf3affc0d84204)
Change-Id: Ic0cdf9f9dd0e35a63b44a4c4a08400020041eddf
|
|
|
|
|
|
|
|
|
| |
Addresses post-submit comments from
I54692ab8105dd09db6af7a2c0894a17bdd118aa0.
Bug: http://b/21309901
Change-Id: Ie19ee8cdcc4055a65fe7dfc103156e54eafe8977
(cherry picked from commit 9d476a02e9a14e847669a6683c585028175aa322)
|
|
|
|
|
|
| |
Bug: 21309901
Change-Id: I54692ab8105dd09db6af7a2c0894a17bdd118aa0
(cherry picked from commit c05554ec5c9aff5e0f1e83de9bb62c3569eecca2)
|
|
|
|
|
|
| |
Bug: 19358804
Change-Id: I38a53ad64c81d0eefdd1d24599e769fd8a477a56
(cherry picked from commit 40a8f214a5264efe5feaaffd55cea67fb87d097b)
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 20664753
Change-Id: I6e43c07daa727c19d87f5192bb719af63dd93654
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new _internal_ function. Provide a global serial number to
support more efficient private caching algorithms. This allows
to skip re-running the __system_property_find() call on misses until
there is a global change in the properties. This call is a read
barrier, the property data to be read following this call will be
read sequentially and up to date.
(Cherry pick from bfd65279a5a9018b01f71773270e462f1b9a7768)
Bug: 19544788
Change-Id: I58e6a92baa0f3e8e7b9ec79b10af6d56407dab48
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I38c473cc0c608b08f971409a95eb8b853cb2ba1c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Spencer Low points out that we never actually set a name because the constant
part of the string was longer than the kernel's maximum, and the kernel
rejects long names rather than truncate.
Shorten the fixed part of the string while still keeping it meaningful. 9999
POSIX timers should be enough for any process...
Bug: https://code.google.com/p/android/issues/detail?id=170089
Change-Id: Ic05f07584c1eac160743519091a540ebbf8d7eb1
|
|/ /
| |
| |
| |
| | |
Bug: http://b/20339788
Change-Id: I874c87faa377645fa9e0752f4fc166d81fd9ef7e
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The visibility control in pthread_atfork.h is incorrect.
It breaks 64bit libc.so by hiding pthread_atfork.
This reverts commit 6df122f8528f9b9fcf7dfea14ae98b0ef66274e1.
Change-Id: I21e4b344d500c6f6de0ccb7420b916c4e233dd34
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This doesn't affect code like Chrome that correctly ignores EINTR on
close, makes code that tries TEMP_FAILURE_RETRY work (where before it might
have closed a different fd and appeared to succeed, or had a bogus EBADF),
and makes "goto fail" code work (instead of mistakenly assuming that EINTR
means that the close failed).
Who loses? Anyone actively trying to detect that they caught a signal while
in close(2). I don't think those people exist, and I think they have better
alternatives available.
Bug: https://code.google.com/p/chromium/issues/detail?id=269623
Bug: http://b/20501816
Change-Id: I11e2f66532fe5d1b0082b2433212e24bdda8219b
|
|/ /
| |
| |
| | |
Change-Id: I326fdf6bb06bed12743f08980b5c69d849c015b8
|
| |
| |
| |
| |
| |
| |
| | |
It seems that a break statement is missing.
Bug: 19872411
Change-Id: I9362783ab726d01f6eb27418563e716dd95688dc
|
|/
|
|
| |
Change-Id: Ia4b1824d20cad3a072b9162047492dade8576779
|
|
|
|
| |
Change-Id: I70a9ebe806cb4f7e23a7d8e486157ddd70ae3008
|
|
|
|
| |
Change-Id: Iec39c3917e0bc94371bd81541619392f5abe29b9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. Don't prevent calling callback when SIGEV_THREAD timers are disarmed by timer_settime.
As in POSIX standard: The effect of disarming or resetting a timer with pending
expiration notifications is unspecified. And glibc didn't prevent in this situation, so I
think it is fine to remove the support.
2. Still prevent calling callback when SIGEV_THREAD timers are deleted by timer_delete.
As in POSIX standard: The disposition of pending signals for the deleted timer is unspecified.
However, glibc handles this (although that is not perfect). And some of our tests in
time_test.cpp depend on this feature as described in b/18039727. so I retain the support.
3. Fix some flaky test in time_test.cpp, and make "time*" test pass on bionic-unit-tests-glibcxx.
Bug: 18263854
Change-Id: I8ced184eacdbfcf433fd81b0c69c38824beb8ebc
|
| |
| |
| |
| |
| |
| |
| | |
Also make thread_local in test static to avoid ld.bfd
warning for arm64.
Change-Id: I09a3f2aa9b73a4fafa3f3bbc64ddc2a128ad50ee
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
Bug: 19993460
Change-Id: I244dea7f5df3c8384f88aa48d635348fafc9cbaf
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 19216648
Change-Id: I3b43b2d18d25b9bde352da1e35f9568133dec7cf
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 19216648
Change-Id: I765ecacc9036659c766f5d1f6600e1a65364199b
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
| |
Bug: 19995392
Change-Id: I497c512648fbe66257da3fb3bcd5c9911f983705
|
|
|
|
|
|
|
| |
This reverts commit a3125fd1396a09a7fc4872dc4653f342150a3deb.
And Fix the prctl() problem that cause system crash.
Change-Id: Icc8d12d848cfba881a7984ca2827fd81be41f9fd
|
|
|
|
|
|
| |
This reverts commit 595752f623ae88f7e4193a6e531a0805f1c6c4dc.
Change-Id: Iefa66e9049ca0424e53cd5fc320d161b93556dcb
|
|
|
|
|
|
|
| |
Signal handlers tend to be lean, but can still overflow the (tiny)
stack.
Change-Id: Ia21c6453d92a9f8d1536ad01ff26a1a84c05f8fb
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some code like in https://buganizer.corp.google.com/u/0/issues/19942911 need to change first.
This reverts commit 03324780aae9ff28c8acf52debf0ea39120e5ab8.
Change-Id: I13ff1e5b3d0672bae9cde234ffba32fbbf33d338
|
|\ \ |
|