aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
27 hoursMerge "new.cpp: add sized operator delete." into mainHEADmastermainElliott Hughes
29 hoursMerge "<malloc.h>: warn on unused results for malloc_usable_size()." into mainElliott Hughes
32 hoursMerge "Add a README.md to docs/, as a guide to what we have available." into ↵Elliott Hughes
main
33 hoursnew.cpp: add sized operator delete.Elliott Hughes
clang-19 and later default to C++14 sized deallocation. Currently we don't have C23's C equivalent of free_sized(), so we just implement these in terms of free() for now. Bug: http://b/344993254 Change-Id: I708710aee3f7a684bfe494a96f7baed014acbe57
2 daysMerge "Update to v6.9 kernel headers." into mainChristopher Ferris
2 daysMerge "<stdio.h>: warn on some unused results." into mainElliott Hughes
2 daysAdd a README.md to docs/, as a guide to what we have available.Elliott Hughes
I was actually here to add some new documentation, but realized there wasn't really a good place to put it... Change-Id: I8a2fc93e61a89e87aa53dd0beb9dfcc6561687ca
2 days<malloc.h>: warn on unused results for malloc_usable_size().Elliott Hughes
Not a security problem, but definitely a bug if you're calling this and ignoring the result, since it has no side-effects. (All of the more important functions -- realloc() especially -- are already annotated.) Change-Id: I217463518b4716befcc0ed9426648eafbfbbdde4
2 daysMerge "<unistd.h>: explain why getpagesize() is better than getauxval() as ↵Elliott Hughes
well as sysconf()." into main
3 daysUpdate to v6.9 kernel headers.Christopher Ferris
Kernel headers coming from: Git: https://android.googlesource.com/kernel/common/ Branch: android-mainline Tag: android-mainline-6.9 Test: Builds and bionic unit tests pass on raven. Test: Able to log in to an Android GO 32 bit device. Change-Id: If53a38bbb65c3c653ce790fe5c6e51597901a14e
3 daysMerge "setjmp_test: riscv64 does have callee-save fp registers." into mainElliott Hughes
3 daysMerge "getpagesize(): remove "portability" claim." into mainElliott Hughes
3 daysgetpagesize(): remove "portability" claim.Elliott Hughes
This is just POSIX nonsense. Android, iOS/macOS, the BSDs, and glibc all have getpagesize(). Window doesn't, but Windows doesn't have sysconf(3) either, so there's not a strong "portability" argument to be had there! Change-Id: Ieacfbb61c3612045f27c20c3fa4fa12694db2243
3 days<unistd.h>: explain why getpagesize() is better than getauxval() as well as ↵Elliott Hughes
sysconf(). I thought we'd already done this, but apparently not. Bug: http://b/315511637 Change-Id: I0581438a6f551be9750b6679a9f3ad06c83f1e9b
3 dayssetjmp_test: riscv64 does have callee-save fp registers.Elliott Hughes
The setjmp implementation is correct, but this comment was wrong, and we were missing the implementation of the test. This would be slightly simpler if we enabled Zfa in the build system and qemu, but this works for now. Change-Id: Iad32771019584beacd8b35138ac2bf4c0a14c903
6 days<stdio.h>: warn on some unused results.Elliott Hughes
This is fairly conservative, touching only those functions (such as feof()) where it's clearly an error to not use the return value. Also fix a test that was ignoring the return value of feof() (because it was just checking whether the function could take the lock, and genuinely didn't care about the result). Change-Id: If2ade10ae87df45a8b9bfcb24828e460201fa9a1
6 daysMerge "Warn about unused results with bsearch()." into mainElliott Hughes
6 daysWarn about unused results with bsearch().Elliott Hughes
This function has no side-effects, and the return value is the whole point. Change-Id: Ibb9143c6a3c4089bfd6402c1c580ef76ce0f5d27
7 daysMerge "fdtrack: make it clearer that there's more information available." ↵Elliott Hughes
into main
7 daysMerge "pthread_exit(): reduce duplication." into mainElliott Hughes
7 daysfdtrack: make it clearer that there's more information available.Elliott Hughes
A lot of people who see these via pitot or whatever don't even think to look at the real tombstone. Make it explicit that this is what they should do next. Also, since we have the numbers, say exactly what we mean by "most common". Bug: http://b/338882189 Change-Id: Ia21848a40e82cb2486538a7578501e2ec0948e1c
7 daysMerge "Spell "calling convention" out in full." into mainElliott Hughes
7 daysMerge "bionic_allocator: more detailed and consistent error reporting." into ↵Elliott Hughes
main
7 daysMerge "Fix some wcwidth() special cases." into mainElliott Hughes
8 daysbionic_allocator: more detailed and consistent error reporting.Elliott Hughes
I only came to improve the signature mismatch error, but I was then annoyed by the copy & paste of the other checks. get_chunk_size() seems to be deliberately avoiding any checks, though I think that might be a bug, and there should be a get_chunk_size() that _does_ check for most callers, and a get_chunk_size_unchecked() for the <sys/thread_properties.h> stuff that seems to want to only be "best effort" (but does still have _some_ possibility of aborting, in addition to the possibility of segfaulting). Also a bit of "include what you use" after cider complained about all the unused includes in bionic_allocator.h. Bug: https://issuetracker.google.com/341850283 Change-Id: I278b495601353733af516a2d60ed10feb9cef36b
8 daysFix some wcwidth() special cases.Elliott Hughes
Detailed explanation in the code comments. Test: treehugger Change-Id: I2aef2510724c1c622b83e226b51d4c8429b88272
8 daysSpell "calling convention" out in full.Elliott Hughes
We only use this in one other place anyway. Also be explicit about how `__tls_get_addr` and `___tls_get_addr` differ, since I missed that at first! Change-Id: Ica214886c5346f118f063bca26e6dd8d74ee21f4
8 daysMerge "Remove unused Android.mk under bionic" into mainTreehugger Robot
8 daysMerge "<sys/thread_properties.h>: remove stray semicolon in the ↵Treehugger Robot
implementation." into main
8 daysMerge "Fix gettid() in functions that call fork() or equivalent." into mainElliott Hughes
9 daysRemove unused Android.mk under bionickellyhung
Bug: b/311284462 Test: CIs Change-Id: I2586c425616ef59dbf2ba88fe1cbaa75a3bc2d5c
9 daysMerge "Revert^2 "Convert Android.mk under bionic to Android.bp"" into mainTreehugger Robot
9 daysFix gettid() in functions that call fork() or equivalent.Elliott Hughes
Bug: https://github.com/android/ndk/issues/2024 Change-Id: Ia264ce219fac99e8823e60c4a2e0607af8518056
13 dayspthread_exit(): reduce duplication.Elliott Hughes
Strictly, this is more of "swap one form of duplication for another", but I found the existing code non-obvious in part because people have added new code under existing comments (which don't apply), in two places. At this point, duplicating the _condition_ (which is much less likely to change at all, let alone grow more complex) clarifies the code and makes the comments match the code they're adjacent to again. Test: treehugger Change-Id: Ic8f01dc5b4fd14e942bf8dd7c72cab7df06d99d5
13 days<sys/thread_properties.h>: remove stray semicolon in the implementation.Elliott Hughes
Test: treehugger Change-Id: I5f9d9d5b45ca74de2eb837c881582a6a87fdf0f6
13 daysRevert^2 "Convert Android.mk under bionic to Android.bp"Kelly Hung
This reverts commit 1e32ad88ffb67cd6a4bea5b5a5edfc7f45ec68e6. Reason for revert: 1. aosp/3099017 merged. 2. verified in ABDT run https://android-build.corp.google.com/abtd/run/L00400030004085752/ Change-Id: I6f07c67ab84ea93406dee88a5d20d0674a2d2a79
2024-05-22Merge "Revert^2 "Switch the loader to a noexcept version of libc++"" into mainRyan Prichard
2024-05-22Merge "bionic: max_android_page_size to 16384" into mainSteven Moreland
2024-05-22Merge "Read maps data before using and do safe reads." into mainChristopher Ferris
2024-05-22bionic: max_android_page_size to 16384Steven Moreland
The maximum page size Android supports now is 16384, and Art only supports 16kB, so we can save a bit of space. Bug: 332556665 Test: N/A Change-Id: I23df607bcc5cf9e96d7b6a66169413cd1a883f7e
2024-05-22Merge "Don't leak a thread when timer_create() fails." into mainElliott Hughes
2024-05-22Merge "Revert "Convert Android.mk under bionic to Android.bp"" into mainSatish Yalla
2024-05-21Read maps data before using and do safe reads.Christopher Ferris
Rather than only updating the maps when a pc can't be found, always update the maps before using them. This avoids issues where the maps change and it could cause a crash reading from a map that has been modified. This assumes that executed code never gets unloaded, or that the code is unloaded so infrequently that it doesn't matter. This happens because the pcs for the backtraces are gathered as the program runs and those pcs are symbolized and made into relative pcs at a later time. Also, add safe reading of the elf data when necessary to avoid any crashes if maps are changing while this is running. Since the MapEntry objects can be deleted, copy the values for the current map in the backtrace code to detect when in our own code instead of keeping a pointer. Bug: 340988785 Test: malloc_debug unit/system tests pass. Test: libmemunreachable tests pass. Change-Id: Ica2ba50a5bcf9e19c7e4033e29a5a67a1847d1a6
2024-05-22Revert "Convert Android.mk under bionic to Android.bp"Priyanka Advani
This reverts commit 12b2042a3f11af0ffc13d18f465fb12c96f73383. Reason for revert: Droidmonitor triggered revert due to build breakage in b/342029467. Will be verifying through ABTD before submission. Change-Id: I801b4999047732b86985f0be2f4aae90b9998e4a
2024-05-22Merge "Convert Android.mk under bionic to Android.bp" into mainTreehugger Robot
2024-05-21Don't leak a thread when timer_create() fails.Elliott Hughes
We do the same thing in pthread_create(). This has the nice side-effect of letting us move part of the child setup that we were doing in the parent into the child where it belongs. Bug: https://issuetracker.google.com/340125671 Change-Id: Ibe646d5ca9066f487d08fd40f004550349e8a02e
2024-05-21Merge "execinfo.cpp: Add a __riscv case." into mainElliott Hughes
2024-05-21Merge "linker benchmark: our riscv64 toolchain has lga now." into mainElliott Hughes
2024-05-21linker benchmark: our riscv64 toolchain has lga now.Elliott Hughes
This doesn't make any difference, but it does let us delete an obsolete comment. Change-Id: Ibf81978bb7883e8c6b86c1f6c459ff70bca3f682
2024-05-21execinfo.cpp: Add a __riscv case.Elliott Hughes
This makes this TraceFunction() more like trace_function() in malloc_debug. I'll leave whether we can collapse these into one implementation as an open question for now... Change-Id: I3981e4114244d49f8dbae1d3b776a7e9c32be688