Merge "s/master/main/" into main am: a01b292ab9
am: f461a3878c
am: 3852cfe4cb
am: 3b3e2e9d46
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2773870 Change-Id: Idc616993e3c11fcc6bd8d9101d9bfa41f3bd129e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
381d04c046
19 changed files with 36 additions and 34 deletions
|
@ -288,14 +288,14 @@ As mentioned above, this is currently a two-step process:
|
||||||
|
|
||||||
Note that if you're actually just trying to expose device-specific headers to
|
Note that if you're actually just trying to expose device-specific headers to
|
||||||
build your device drivers, you shouldn't modify bionic. Instead use
|
build your device drivers, you shouldn't modify bionic. Instead use
|
||||||
`TARGET_DEVICE_KERNEL_HEADERS` and friends described in [config.mk](https://android.googlesource.com/platform/build/+/master/core/config.mk#186).
|
`TARGET_DEVICE_KERNEL_HEADERS` and friends described in [config.mk](https://android.googlesource.com/platform/build/+/main/core/config.mk#186).
|
||||||
|
|
||||||
|
|
||||||
## Updating tzdata
|
## Updating tzdata
|
||||||
|
|
||||||
This is handled by the libcore team, because they own icu, and that needs to be
|
This is handled by the libcore team, because they own icu, and that needs to be
|
||||||
updated in sync with bionic). See
|
updated in sync with bionic). See
|
||||||
[system/timezone/README.android](https://android.googlesource.com/platform/system/timezone/+/master/README.android).
|
[system/timezone/README.android](https://android.googlesource.com/platform/system/timezone/+/main/README.android).
|
||||||
|
|
||||||
|
|
||||||
## Verifying changes
|
## Verifying changes
|
||||||
|
|
|
@ -7,7 +7,7 @@ See also [bionic status](docs/status.md) for general libc/libm/libdl
|
||||||
behavior changes.
|
behavior changes.
|
||||||
|
|
||||||
See also the
|
See also the
|
||||||
[unwinder documentation](https://android.googlesource.com/platform/system/unwinding/+/refs/heads/master/libunwindstack/AndroidVersions.md)
|
[unwinder documentation](https://android.googlesource.com/platform/system/unwinding/+/refs/heads/main/libunwindstack/AndroidVersions.md)
|
||||||
for details about changes in stack unwinding (crash dumps) between
|
for details about changes in stack unwinding (crash dumps) between
|
||||||
different releases.
|
different releases.
|
||||||
|
|
||||||
|
|
|
@ -185,4 +185,4 @@ Some devices have a `perf-setup.sh` script that locks CPU and GPU frequencies. S
|
||||||
benchmarks appear to be using the script. For more information:
|
benchmarks appear to be using the script. For more information:
|
||||||
* run `get_build_var BOARD_PERFSETUP_SCRIPT`
|
* run `get_build_var BOARD_PERFSETUP_SCRIPT`
|
||||||
* run `m perf-setup` to install the script into `${OUT}/data/local/tmp/perf-setup.sh`
|
* run `m perf-setup` to install the script into `${OUT}/data/local/tmp/perf-setup.sh`
|
||||||
* see: https://android.googlesource.com/platform/platform_testing/+/refs/heads/master/scripts/perf-setup/
|
* see: https://android.googlesource.com/platform/platform_testing/+/refs/heads/main/scripts/perf-setup/
|
||||||
|
|
|
@ -46,7 +46,7 @@ Assertion failures are probably the most innocuous result that can arise from th
|
||||||
|
|
||||||
fdsan attempts to detect and/or prevent file descriptor mismanagement by enforcing file descriptor ownership. Like how most memory allocations can have their ownership handled by types such as `std::unique_ptr`, almost all file descriptors can be associated with a unique owner which is responsible for their closure. fdsan provides functions to associate a file descriptor with an owner; if someone tries to close a file descriptor that they don't own, depending on configuration, either a warning is emitted, or the process aborts.
|
fdsan attempts to detect and/or prevent file descriptor mismanagement by enforcing file descriptor ownership. Like how most memory allocations can have their ownership handled by types such as `std::unique_ptr`, almost all file descriptors can be associated with a unique owner which is responsible for their closure. fdsan provides functions to associate a file descriptor with an owner; if someone tries to close a file descriptor that they don't own, depending on configuration, either a warning is emitted, or the process aborts.
|
||||||
|
|
||||||
The way this is implemented is by providing functions to set a 64-bit closure tag on a file descriptor. The tag consists of an 8-bit type byte that identifies the type of the owner (`enum android_fdan_owner_type` in [`<android/fdsan.h>`](https://android.googlesource.com/platform/bionic/+/master/libc/include/android/fdsan.h)), and a 56-bit value. The value should ideally be something that uniquely identifies the object (object address for native objects and `System.identityHashCode` for Java objects), but in cases where it's hard to derive an identifier for the "owner" that should close a file descriptor, even using the same value for all file descriptors in the module can be useful, since it'll catch other code that closes your file descriptors.
|
The way this is implemented is by providing functions to set a 64-bit closure tag on a file descriptor. The tag consists of an 8-bit type byte that identifies the type of the owner (`enum android_fdan_owner_type` in [`<android/fdsan.h>`](https://android.googlesource.com/platform/bionic/+/main/libc/include/android/fdsan.h)), and a 56-bit value. The value should ideally be something that uniquely identifies the object (object address for native objects and `System.identityHashCode` for Java objects), but in cases where it's hard to derive an identifier for the "owner" that should close a file descriptor, even using the same value for all file descriptors in the module can be useful, since it'll catch other code that closes your file descriptors.
|
||||||
|
|
||||||
If a file descriptor that's been marked with a tag is closed with an incorrect tag, or without a tag, we know something has gone wrong, and can generate diagnostics or abort.
|
If a file descriptor that's been marked with a tag is closed with an incorrect tag, or without a tag, we know something has gone wrong, and can generate diagnostics or abort.
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ fdsan has four severity levels:
|
||||||
- fatal (`ANDROID_FDSAN_ERROR_LEVEL_FATAL`)
|
- fatal (`ANDROID_FDSAN_ERROR_LEVEL_FATAL`)
|
||||||
- Abort upon detecting an error.
|
- Abort upon detecting an error.
|
||||||
|
|
||||||
In Android Q, fdsan has a global default of warn-once. fdsan can be made more or less strict at runtime via the `android_fdsan_set_error_level` function in [`<android/fdsan.h>`](https://android.googlesource.com/platform/bionic/+/master/libc/include/android/fdsan.h).
|
In Android Q, fdsan has a global default of warn-once. fdsan can be made more or less strict at runtime via the `android_fdsan_set_error_level` function in [`<android/fdsan.h>`](https://android.googlesource.com/platform/bionic/+/main/libc/include/android/fdsan.h).
|
||||||
|
|
||||||
The likelihood of fdsan catching a file descriptor error is proportional to the percentage of file descriptors in your process that are tagged with an owner.
|
The likelihood of fdsan catching a file descriptor error is proportional to the percentage of file descriptors in your process that are tagged with an owner.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ that's invoked on file descriptor operations, and a library that implements a
|
||||||
hook to perform and store backtraces for file descriptor creation.
|
hook to perform and store backtraces for file descriptor creation.
|
||||||
|
|
||||||
### bionic hooks
|
### bionic hooks
|
||||||
bionic provides a header in the `bionic_libc_platform_headers` header_lib at <[bionic/fdtrack.h](https://android.googlesource.com/platform/bionic/+/refs/heads/master/libc/platform/bionic/fdtrack.h)>.
|
bionic provides a header in the `bionic_libc_platform_headers` header_lib at <[bionic/fdtrack.h](https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/platform/bionic/fdtrack.h)>.
|
||||||
Register a callback with `android_fdtrack_compare_exchange_hook` to receive
|
Register a callback with `android_fdtrack_compare_exchange_hook` to receive
|
||||||
callbacks upon file descriptor creation and destruction. This function can be
|
callbacks upon file descriptor creation and destruction. This function can be
|
||||||
called at any point in order to start capturing events, but be sure to properly
|
called at any point in order to start capturing events, but be sure to properly
|
||||||
|
@ -18,7 +18,7 @@ context, but not vfork (bionic tracks whether a thread is vforked, and chooses
|
||||||
not to call callbacks when this is the case).
|
not to call callbacks when this is the case).
|
||||||
|
|
||||||
### libfdtrack
|
### libfdtrack
|
||||||
[libfdtrack](https://android.googlesource.com/platform/bionic/+/refs/heads/master/libfdtrack)
|
[libfdtrack](https://android.googlesource.com/platform/bionic/+/refs/heads/main/libfdtrack)
|
||||||
implements a library that uses libunwindstack to unwind and store fd creation backtraces.
|
implements a library that uses libunwindstack to unwind and store fd creation backtraces.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -323,8 +323,8 @@ one after another. This will cause a lot of threads allocating at the same
|
||||||
time. The trace data does not include timestamps,
|
time. The trace data does not include timestamps,
|
||||||
so it is not possible to create a completely accurate replay.
|
so it is not possible to create a completely accurate replay.
|
||||||
|
|
||||||
To generate these traces, see the [Malloc Debug documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md),
|
To generate these traces, see the [Malloc Debug documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_debug/README.md),
|
||||||
the option [record\_allocs](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md#record_allocs_total_entries).
|
the option [record\_allocs](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_debug/README.md#record_allocs_total_entries).
|
||||||
|
|
||||||
To run these benchmarks, first copy the trace files to the target using
|
To run these benchmarks, first copy the trace files to the target using
|
||||||
these commands:
|
these commands:
|
||||||
|
|
|
@ -11,7 +11,7 @@ for changes related to native code loading in various Android releases.
|
||||||
### POSIX
|
### POSIX
|
||||||
|
|
||||||
You can see the current status with respect to POSIX in the form of tests:
|
You can see the current status with respect to POSIX in the form of tests:
|
||||||
https://android.googlesource.com/platform/bionic/+/master/tests/headers/posix/
|
https://android.googlesource.com/platform/bionic/+/main/tests/headers/posix/
|
||||||
|
|
||||||
Some POSIX functionality is not supported by the Linux kernel, and
|
Some POSIX functionality is not supported by the Linux kernel, and
|
||||||
is guarded with tests for `__linux__`. Other functionality is not
|
is guarded with tests for `__linux__`. Other functionality is not
|
||||||
|
@ -53,7 +53,7 @@ list of POSIX functions implemented by glibc but not by bionic.
|
||||||
|
|
||||||
### libc
|
### libc
|
||||||
|
|
||||||
Current libc symbols: https://android.googlesource.com/platform/bionic/+/master/libc/libc.map.txt
|
Current libc symbols: https://android.googlesource.com/platform/bionic/+/main/libc/libc.map.txt
|
||||||
|
|
||||||
New libc functions in V (API level 35):
|
New libc functions in V (API level 35):
|
||||||
* `tcgetwinsize`, `tcsetwinsize` (POSIX Issue 8 additions).
|
* `tcgetwinsize`, `tcsetwinsize` (POSIX Issue 8 additions).
|
||||||
|
@ -299,7 +299,7 @@ ndk-r21$ for i in `ls -1v platforms/android-*/arch-arm/usr/lib/libc.so` ; do \
|
||||||
|
|
||||||
### libm
|
### libm
|
||||||
|
|
||||||
Current libm symbols: https://android.googlesource.com/platform/bionic/+/master/libm/libm.map.txt
|
Current libm symbols: https://android.googlesource.com/platform/bionic/+/main/libm/libm.map.txt
|
||||||
|
|
||||||
0 remaining missing C11/POSIX libm functions.
|
0 remaining missing C11/POSIX libm functions.
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
* @brief Functions and constants for dealing with multiple API levels.
|
* @brief Functions and constants for dealing with multiple API levels.
|
||||||
*
|
*
|
||||||
* See
|
* See
|
||||||
* https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
|
* https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
@ -50,7 +50,7 @@ __BEGIN_DECLS
|
||||||
/**
|
/**
|
||||||
* Magic version number for an Android OS build which has not yet turned
|
* Magic version number for an Android OS build which has not yet turned
|
||||||
* into an official release, for comparison against `__ANDROID_API__`. See
|
* into an official release, for comparison against `__ANDROID_API__`. See
|
||||||
* https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
|
* https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
|
||||||
*/
|
*/
|
||||||
#define __ANDROID_API_FUTURE__ 10000
|
#define __ANDROID_API_FUTURE__ 10000
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ __BEGIN_DECLS
|
||||||
*
|
*
|
||||||
* See android_get_device_api_level(),
|
* See android_get_device_api_level(),
|
||||||
* android_get_application_target_sdk_version() and
|
* android_get_application_target_sdk_version() and
|
||||||
* https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
|
* https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
|
||||||
*/
|
*/
|
||||||
#define __ANDROID_API__ __ANDROID_API_FUTURE__
|
#define __ANDROID_API__ __ANDROID_API_FUTURE__
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -361,7 +361,7 @@ int mallopt(int __option, int __value) __INTRODUCED_IN(26);
|
||||||
*
|
*
|
||||||
* Available since API level 28.
|
* Available since API level 28.
|
||||||
*
|
*
|
||||||
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
|
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
|
||||||
*/
|
*/
|
||||||
extern void* _Nonnull (*volatile _Nonnull __malloc_hook)(size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
extern void* _Nonnull (*volatile _Nonnull __malloc_hook)(size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ extern void* _Nonnull (*volatile _Nonnull __malloc_hook)(size_t __byte_count, co
|
||||||
*
|
*
|
||||||
* Available since API level 28.
|
* Available since API level 28.
|
||||||
*
|
*
|
||||||
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
|
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
|
||||||
*/
|
*/
|
||||||
extern void* _Nonnull (*volatile _Nonnull __realloc_hook)(void* _Nullable __ptr, size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
extern void* _Nonnull (*volatile _Nonnull __realloc_hook)(void* _Nullable __ptr, size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ extern void* _Nonnull (*volatile _Nonnull __realloc_hook)(void* _Nullable __ptr,
|
||||||
*
|
*
|
||||||
* Available since API level 28.
|
* Available since API level 28.
|
||||||
*
|
*
|
||||||
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
|
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
|
||||||
*/
|
*/
|
||||||
extern void (*volatile _Nonnull __free_hook)(void* _Nullable __ptr, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
extern void (*volatile _Nonnull __free_hook)(void* _Nullable __ptr, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ extern void (*volatile _Nonnull __free_hook)(void* _Nullable __ptr, const void*
|
||||||
*
|
*
|
||||||
* Available since API level 28.
|
* Available since API level 28.
|
||||||
*
|
*
|
||||||
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
|
* See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/main/libc/malloc_hooks/README.md)
|
||||||
*/
|
*/
|
||||||
extern void* _Nonnull (*volatile _Nonnull __memalign_hook)(size_t __alignment, size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
extern void* _Nonnull (*volatile _Nonnull __memalign_hook)(size_t __alignment, size_t __byte_count, const void* _Nonnull __caller) __INTRODUCED_IN(28);
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ int renameat2(int __old_dir_fd, const char* _Nonnull __old_path, int __new_dir_f
|
||||||
int fseek(FILE* _Nonnull __fp, long __offset, int __whence);
|
int fseek(FILE* _Nonnull __fp, long __offset, int __whence);
|
||||||
long ftell(FILE* _Nonnull __fp);
|
long ftell(FILE* _Nonnull __fp);
|
||||||
|
|
||||||
/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
|
/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
|
||||||
#if defined(__USE_FILE_OFFSET64)
|
#if defined(__USE_FILE_OFFSET64)
|
||||||
int fgetpos(FILE* _Nonnull __fp, fpos_t* _Nonnull __pos) __RENAME(fgetpos64) __INTRODUCED_IN(24);
|
int fgetpos(FILE* _Nonnull __fp, fpos_t* _Nonnull __pos) __RENAME(fgetpos64) __INTRODUCED_IN(24);
|
||||||
int fsetpos(FILE* _Nonnull __fp, const fpos_t* _Nonnull __pos) __RENAME(fsetpos64) __INTRODUCED_IN(24);
|
int fsetpos(FILE* _Nonnull __fp, const fpos_t* _Nonnull __pos) __RENAME(fsetpos64) __INTRODUCED_IN(24);
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `__BIONIC__` is always defined if you're building with bionic. See
|
* `__BIONIC__` is always defined if you're building with bionic. See
|
||||||
* https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
|
* https://android.googlesource.com/platform/bionic/+/main/docs/defines.md.
|
||||||
*/
|
*/
|
||||||
#define __BIONIC__ 1
|
#define __BIONIC__ 1
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _FILE_OFFSET_BITS 64 support.
|
* _FILE_OFFSET_BITS 64 support.
|
||||||
* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
|
* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
|
||||||
*/
|
*/
|
||||||
#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
|
#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
|
||||||
# define __USE_FILE_OFFSET64 1
|
# define __USE_FILE_OFFSET64 1
|
||||||
|
|
|
@ -58,7 +58,7 @@ void* _Nonnull mmap(void* _Nullable __addr, size_t __size, int __prot, int __fla
|
||||||
/**
|
/**
|
||||||
* mmap64() is a variant of mmap() that takes a 64-bit offset even on LP32.
|
* mmap64() is a variant of mmap() that takes a 64-bit offset even on LP32.
|
||||||
*
|
*
|
||||||
* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
|
* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
|
||||||
*/
|
*/
|
||||||
void* _Nonnull mmap64(void* _Nullable __addr, size_t __size, int __prot, int __flags, int __fd, off64_t __offset);
|
void* _Nonnull mmap64(void* _Nullable __addr, size_t __size, int __prot, int __flags, int __fd, off64_t __offset);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
|
/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
|
||||||
#if defined(__USE_FILE_OFFSET64)
|
#if defined(__USE_FILE_OFFSET64)
|
||||||
ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count) __RENAME(sendfile64);
|
ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count) __RENAME(sendfile64);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -96,7 +96,7 @@ typedef __kernel_time_t __time_t;
|
||||||
typedef __time_t time_t;
|
typedef __time_t time_t;
|
||||||
|
|
||||||
/* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */
|
/* This historical accident means that we had a 32-bit off_t on 32-bit architectures. */
|
||||||
/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
|
/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
|
||||||
#if defined(__USE_FILE_OFFSET64) || defined(__LP64__)
|
#if defined(__USE_FILE_OFFSET64) || defined(__LP64__)
|
||||||
typedef int64_t off_t;
|
typedef int64_t off_t;
|
||||||
typedef off_t loff_t;
|
typedef off_t loff_t;
|
||||||
|
|
|
@ -265,7 +265,7 @@ int dup3(int __old_fd, int __new_fd, int __flags);
|
||||||
int fsync(int __fd);
|
int fsync(int __fd);
|
||||||
int fdatasync(int __fd);
|
int fdatasync(int __fd);
|
||||||
|
|
||||||
/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
|
/* See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md */
|
||||||
#if defined(__USE_FILE_OFFSET64)
|
#if defined(__USE_FILE_OFFSET64)
|
||||||
int truncate(const char* _Nonnull __path, off_t __length) __RENAME(truncate64);
|
int truncate(const char* _Nonnull __path, off_t __length) __RENAME(truncate64);
|
||||||
off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64);
|
off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64);
|
||||||
|
|
|
@ -409,7 +409,8 @@ bool Config::VerifyValueEmpty(const std::string& option, const std::string& valu
|
||||||
|
|
||||||
void Config::LogUsage() const {
|
void Config::LogUsage() const {
|
||||||
error_log("For malloc debug option descriptions go to:");
|
error_log("For malloc debug option descriptions go to:");
|
||||||
error_log(" https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md");
|
error_log(
|
||||||
|
" https://android.googlesource.com/platform/bionic/+/main/libc/malloc_debug/README.md");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Config::GetOption(const char** options_str, std::string* option, std::string* value) {
|
bool Config::GetOption(const char** options_str, std::string* option, std::string* value) {
|
||||||
|
|
|
@ -170,7 +170,7 @@ backtrace\_max\_size will be backtraced. The backtrace\_size option
|
||||||
overrides this option, and should not be used at the same time.
|
overrides this option, and should not be used at the same time.
|
||||||
|
|
||||||
This option can also be used in combination with other tools such
|
This option can also be used in combination with other tools such
|
||||||
as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md)
|
as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/main/README.md)
|
||||||
to only get backtraces for sizes of allocations listed as being leaked.
|
to only get backtraces for sizes of allocations listed as being leaked.
|
||||||
|
|
||||||
### backtrace\_max\_size=ALLOCATION\_SIZE\_BYTES
|
### backtrace\_max\_size=ALLOCATION\_SIZE\_BYTES
|
||||||
|
@ -183,7 +183,7 @@ backtrace\_max\_size will be backtraced. The backtrace\_size option
|
||||||
overrides this option, and should not be used at the same time.
|
overrides this option, and should not be used at the same time.
|
||||||
|
|
||||||
This option can also be used in combination with other tools such
|
This option can also be used in combination with other tools such
|
||||||
as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md)
|
as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/main/README.md)
|
||||||
to only get backtraces for sizes of allocations listed as being leaked.
|
to only get backtraces for sizes of allocations listed as being leaked.
|
||||||
|
|
||||||
### backtrace\_size=ALLOCATION\_SIZE\_BYTES
|
### backtrace\_size=ALLOCATION\_SIZE\_BYTES
|
||||||
|
@ -192,7 +192,7 @@ that only allocations of size **ALLOCATION\_SIZE\_BYTES** will be backtraced.
|
||||||
This option overrides the backtrace\_min\_size and the backtrace\_max\_size.
|
This option overrides the backtrace\_min\_size and the backtrace\_max\_size.
|
||||||
|
|
||||||
This option can also be used in combination with other tools such
|
This option can also be used in combination with other tools such
|
||||||
as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/master/README.md)
|
as [libmemunreachable](https://android.googlesource.com/platform/system/memory/libmemunreachable/+/main/README.md)
|
||||||
to only get backtraces for sizes of allocations listed as being leaked.
|
to only get backtraces for sizes of allocations listed as being leaked.
|
||||||
|
|
||||||
### backtrace\_full
|
### backtrace\_full
|
||||||
|
|
|
@ -40,8 +40,9 @@ class MallocDebugConfigTest : public ::testing::Test {
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string usage_string(
|
std::string usage_string(
|
||||||
"6 malloc_debug For malloc debug option descriptions go to:\n"
|
"6 malloc_debug For malloc debug option descriptions go to:\n"
|
||||||
"6 malloc_debug https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md\n");
|
"6 malloc_debug "
|
||||||
|
"https://android.googlesource.com/platform/bionic/+/main/libc/malloc_debug/README.md\n");
|
||||||
|
|
||||||
TEST_F(MallocDebugConfigTest, unknown_option) {
|
TEST_F(MallocDebugConfigTest, unknown_option) {
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class VersionTracker {
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr const char* kBionicChangesUrl =
|
static constexpr const char* kBionicChangesUrl =
|
||||||
"https://android.googlesource.com/platform/bionic/+/master/"
|
"https://android.googlesource.com/platform/bionic/+/main/"
|
||||||
"android-changes-for-ndk-developers.md";
|
"android-changes-for-ndk-developers.md";
|
||||||
|
|
||||||
soinfo* get_libdl_info(const soinfo& linker_si);
|
soinfo* get_libdl_info(const soinfo& linker_si);
|
||||||
|
|
Loading…
Reference in a new issue