Home
last modified time | relevance | path

Searched refs:is (Results 1 – 25 of 59) sorted by relevance

123

/bionic/libc/malloc_hooks/
DREADME.md5 happen during execution. It is only available in Android P and newer versions
11 When malloc hooks is enabled, it works by adding a shim layer that replaces
35 When malloc is called and \_\_malloc\_hook has been set, then the hook
36 function is called instead.
38 When realloc is called and \_\_realloc\_hook has been set, then the hook
39 function is called instead.
41 When free is called and \_\_free\_hook has been set, then the hook
42 function is called instead.
44 When memalign is called and \_\_memalign\_hook has been set, then the hook
45 function is called instead.
[all …]
/bionic/libc/malloc_debug/
DREADME.md4 Malloc debug is a method of debugging native memory problems. It can help
10 The documentation for malloc debug on older versions of Android is
13 When malloc debug is enabled, it works by adding a shim layer that replaces
32 NOTE: There is a small behavioral change beginning in P for realloc.
41 Malloc debug is controlled by individual options. Each option can be enabled
48 Enables a small buffer placed before the allocated data. This is an attempt
50 On first allocation, this front guard is written with a specific pattern (0xaa).
51 When the allocation is freed, the guard is checked to verify it has not been
52 modified. If any part of the front guard is modified, an error will be reported
55 If the backtrace option is also enabled, then any error message will include
[all …]
DREADME_marshmallow_and_earlier.md4 Malloc debug is a method of debugging native memory problems. It can help
10 is not guaranteed to work at all.
12 The documentation for malloc debug on newer versions of Android is
19 When malloc debug is enabled, it works by adding a shim layer that replaces
39 Malloc debug is controlled by a system property that takes a numeric value
59 entry is returned in the list.
66 Whenever an allocation is created, initialize the data with a known
68 Whenever an allocation is freed, write a known pattern over the data (0xef).
78 A 32 byte buffer is placed before the returned allocation (known as
79 a front guard). This buffer is filled with the pattern (0xaa). In addition,
[all …]
DREADME_api.md12 *info* is set to a buffer allocated by the call that contains all of
14 *overall\_size* is set to the total size of the buffer returned. If this
16 value is zero, then there are no allocation being tracked.
17 *total\_memory* is set to the sum of all allocation sizes that are live at
20 *backtrace\_size* is set to the maximum number of backtrace entries
37 The number of *uintptr\_t* values is determined by the value
39 *get\_malloc\_leak\_info*. This value is not variable, it is the same
44 Each *uintptr\_t* is a pc of the callstack. If the total number
45 of backtrace entries is less than *backtrace\_size*, the rest of the
53 The total number of these structures returned in *info* is
/bionic/libm/upstream-freebsd/lib/msun/src/
De_powf.c64 int32_t hx,hy,ix,iy,is; in powf() local
148 GET_FLOAT_WORD(is,t1); in powf()
149 SET_FLOAT_WORD(t1,is&0xfffff000); in powf()
171 GET_FLOAT_WORD(is,s_h); in powf()
172 SET_FLOAT_WORD(s_h,is&0xfffff000); in powf()
174 is = ((ix>>1)&0xfffff000)|0x20000000; in powf()
175 SET_FLOAT_WORD(t_h,is+0x00400000+(k<<21)); in powf()
184 GET_FLOAT_WORD(is,t_h); in powf()
185 SET_FLOAT_WORD(t_h,is&0xfffff000); in powf()
192 GET_FLOAT_WORD(is,p_h); in powf()
[all …]
/bionic/docs/
Ddefines.md3 Using `#ifdef` or equivalents is common when writing portable code. Which to use
9 If your code is specific to Android's C library, bionic, use `__BIONIC__`. This
10 is typically a good choice when you use libc API that's only in bionic, such as
12 `__GLIBC__`, `__APPLE__`, or `_WIN32`. Note that although bionic is most often
13 seen on Android devices, it is possible to use bionic on the host too.
17 If your code is specific to Android devices, use `__ANDROID__`. This isn't
18 useful as you might think, and one of the other choices on this page is usually
19 more appropriate. This is typically a good choice if you have code that's part
21 Genuine cases are quite rare, and `__BIONIC__` is often more specific (but
22 remember that it is possible -- if unusual -- to use bionic on the host).
[all …]
Dnative_allocator.md10 It is important to note that there are two modes for a native allocator
11 to run in on Android. The first is the normal allocator, the second is
12 called the svelte config, which is designed to run on memory constrained
18 The `BoardConfig.mk` file is usually found in the directory
35 is made to `malloc_enable`, the paused threads should start running again.
39 to `malloc_disable`. This call will unpause any thread which is making
45 system. It is meant to be called after a call to `malloc_disable` to
46 prevent further allocations while this call is being executed. To
47 see what is expected for this function, the best description is the
55 When set to zero, `mallopt(M_DECAY_TIME, 0)`, it is expected that an
[all …]
Dlibc_assembler.md9 verify that the routine is being properly tested.
18 there is no major difference in performance on each.
50 This is for 64 bit libc routines.
54 This is for 32 bit libc routines.
56 Here is an example of how the benchmark should be executed. For this
62 The last argument is the name of the one function that you want to
74 Bionic benchmarks is based on the [Google Benchmarks](https://github.com/google/benchmark)
82 …***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will i…
93 When running the benchmarks, CPU scaling is not normally enabled. This means
96 is beyond the scope of this document. However, most of the benchmarks max
[all …]
Dclang_fortify_anatomy.md11 The intent of this document is to run through the minutiae of how Clang FORTIFY
19 FORTIFY is a broad suite of extensions to libc aimed at catching misuses of
33 FORTIFY is traditionally enabled by passing `-D_FORTIFY_SOURCE=N` to your
37 are [incompatible with stricter versions of FORTIFY checking]. This is largely
44 Further, given FORTIFY's design, the effectiveness of FORTIFY is a function of
49 analysis of FORTIFY functions and commentary on builtins assume that code is
57 divergence is an artifact of Clang and GCC's differing architecture as
79 * FORTIFY_WARNING_ONLY_IF_SIZE_OF_BUF_LESS_THAN is not defined, due to its
86 FORTIFY_WARNING_ONLY_IF_SIZE_OF_BUF_LESS_THAN(buf, size, "`buf` is too smol.")
94 implementations is out-of-scope for this doc, however.
[all …]
D32-bit-abi.md5 On 32-bit Android, `off_t` is a signed 32-bit integer. This limits functions
46 aren't aware that `_FILE_OFFSET_BITS` is set. You might also have to
47 remove references to `__USE_FILE_OFFSET64` --- this is the internal
48 flag that should never be set by user code but sometimes is (by zlib,
56 #error "oops, __USE_FILE_OFFSET64 is defined"
60 In the 64-bit ABI, `off_t` is always 64-bit.
66 ## `sigset_t` is too small for real-time signals
68 On 32-bit Android, `sigset_t` is too small for ARM and x86. This means that
69 there is no support for real-time signals in 32-bit code. Android P (API
74 On 32-bit Android, `struct sigaction` is also too small because it contains
[all …]
DEINTR.md5 If your code is blocked in a system call when a signal needs to be delivered,
8 what data it has. (This is one reason why read(2) sometimes returns less data
9 than you asked for, even though more data is available. It also explains why
10 such behavior is relatively rare, and a cause of bugs.)
13 system call, for which there is no equivalent "partial" success, such as
17 The kernel's solution to this problem is to return failure (-1) and set
23 disposition is set to ignore, the kernel doesn't even have to deliver the
56 In most cases, the fix is simple: wrap the system call with the
57 `TEMP_FAILURE_RETRY` macro. This is basically a while loop that retries the
58 system call as long as the result is -1 and errno is `EINTR`.
[all …]
Dfdtrack.md5 fdtrack is a file descriptor leak checker added to Android in API level 30.
17 context, but not vfork (bionic tracks whether a thread is vforked, and chooses
18 not to call callbacks when this is the case).
27 backtraces, `dlopen("libfdtrack.so", RTLD_GLOBAL)` is all that's needed. To dump
31 `fdtrack_iterate` can be used (warning: this interface is currently unstable,
36 backtraces. Instead, if you can detect that an fd leak is ongoing, turning on
52 * Uses malloc internally: unsafe unless a separate allocator is
64 * Frame layout is a mess on 32-bit ARM: the ARM standard, clang, and GCC
70 is critical to being useful for the initial user, system_server.
Delf-tls.md12 ELF TLS is a system for automatically allocating thread-local variables with cooperation among the
21 At run-time, TLS variables are allocated on a module-by-module basis, where a module is a shared
40 an executable, the linker needs to know where an executable's TLS segment is relative to the TP so
42 thread-specific data layout, but variant 1 is more problematic than variant 2.
46 1, and its storage will always be immediately after (or before) the TP. In variant 1, the TP is
48 from TP is implementation-defined.
50 The DTV's "generation" field is used to lazily update/reallocate the DTV when new modules are loaded
100 `R_TLS_DTPMOD` is a dynamic relocation to the index of the module containing `tls_var`, and
101 `R_TLS_DTPOFF` is a dynamic relocation to the offset of `tls_var` within its module's `PT_TLS`
105 the module's TLS block. Before it can do this, it ensures that the module's TLS block is allocated.
[all …]
Dstatus.md16 Some POSIX functionality is not supported by the Linux kernel, and
17 is guarded with tests for `__linux__`. Other functionality is not
40 locale supported is a UTF-8 C/POSIX locale. Most of the POSIX APIs are
48 [This is why we can't have safe cancellation points](https://lwn.net/Articles/683118/)
76 vector if the environment variable is set.
132 * `aligned_alloc` correctly verifies that `size` is a multiple of `alignment`.
133 * Using `%n` with the printf family is now reported as a FORTIFY failure.
136 is unchanged.
165 * Passing a null `FILE*` or `DIR*` to libc is now detected at runtime and
192 * Passing an invalid `pthread_t` to libc is now detected at runtime and
[all …]
/bionic/linker/
Dld.config.format.md14 This part of the document maps location of an executable to a section. Here is an example
16 The format is `dir.<section_name>=<directory>`
22 Every section starts with `[section_name]` (which is used in mappings) and it defines namespaces
35 # When this flag is set to true linker will set target_sdk_version for this binary to
38 # default value is false
41 # This property can be used to declare additional namespaces. Note that there is always the default
42 # namespace. The default namespace is the namespace for the main executable. This list is
46 # Each namespace property starts with "namespace.<namespace-name>" The following is configuration
49 # Is namespace isolated - the default value is false
52 # Default namespace search path. Note that ${LIB} here is substituted with "lib" for 32bit targets
[all …]
/bionic/libc/
DSECCOMP_BLOCKLIST_COMMON.TXT1 # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
2 # Note that the resultant policy is applied only to zygote spawned processes.
4 # The final seccomp allowlist is SYSCALLS.TXT - SECCOMP_BLOCKLIST.TXT + SECCOMP_ALLOWLIST.TXT
7 # This file is processed by a python script named genseccomp.py.
DSECCOMP_ALLOWLIST_SYSTEM.TXT1 # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
2 # Note that the resultant policy is applied only to zygote spawned processes.
4 # This file is processed by a python script named genseccomp.py.
DSECCOMP_PRIORITY.TXT1 # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
2 # Note that the resultant policy is applied only to zygote spawned processes.
4 # This file is processed by a python script named genseccomp.py.
DSECCOMP_BLOCKLIST_APP.TXT1 # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
2 # Note that the resultant policy is applied only to zygote spawned processes.
4 # The final seccomp allowlist is SYSCALLS.TXT - SECCOMP_BLOCKLIST.TXT + SECCOMP_ALLOWLIST.TXT
7 # This file is processed by a python script named genseccomp.py.
10 # including capset and setresuid. This is because the seccomp filter must be installed while
24 # setresuid is explicitly allowed, see above.
DSECCOMP_ALLOWLIST_COMMON.TXT1 # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
2 # Note that the resultant policy is applied only to zygote spawned processes.
4 # This file is processed by a python script named genseccomp.py.
23 # vfork is used by bionic (and java.lang.ProcessBuilder) on some
61 # to be (because the last thing anyone needs is a new 32-bit ABI in the
83 # changes size over time is obviously problematic).
/bionic/
DREADME.md3 [bionic](https://en.wikipedia.org/wiki/Bionic_(software)) is Android's
6 This document is a high-level overview of making changes to bionic itself.
24 The dynamic linker interface library. This is actually just a bunch of stubs
26 runtime. This is where stuff like `dlopen(3)` lives.
87 # kernel. This is because ISO C and POSIX will say things like "there is
88 # a constant called PROT_NONE" or "there is a type called struct stat,
131 # This is where we keep the hacks necessary to build BSD source
137 # This is the biggest mess. The C++ files are files we own, typically
138 # because the Linux kernel interface is sufficiently different that we
167 The first question you should ask is "should I add a libc wrapper for
[all …]
Dandroid-changes-for-ndk-developers.md21 Our general practice with dynamic linker behavior changes is that they
31 is loaded, even if you're not yet targeting that API level.
71 group. The global group is shared by all libraries and contains the main
73 flag set (by passing “-z global” to ld(1)). The local group is
90 The dlopen(3) RTLD_LOCAL flag used to be ignored but is implemented
91 correctly in API level 23 and later. Note that RTLD_LOCAL is the default,
101 symbol lookup and is supported by Android's dynamic linker in API level 23 and
113 is the first release where search by soname is implemented. Earlier
134 version. This is supported in API level 23 and above.
160 this rule is enforced and applications are no longer able to load all
[all …]
/bionic/benchmarks/
DREADME.md7 `bionic-benchmarks` is a command line tool for measuring the runtimes of libc functions. It is built
35 to an XML file such as `/data/nativetest/suites/example.xml`, it will be used as-is.
37 If no XML file is specified through the command-line option, the default is to use `suites/full.xml…
38 However, for the host bionic benchmarks (`bionic-benchmarks-glibc`), the default is to use
43 The format for a benchmark is:
96 spent in the spawned process. The real-time is probably more useful, and it is the figure used to
107 "repetitions". By default, the repetition count is one. Google Benchmark runs the benchmark a few
161 A similar result can be achieved using `taskset`. The first parameter is a bitmask of core numbers
182 …***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will i…
/bionic/benchmarks/spawn/
DAndroid.bp100 // When this binary is installed to host/linux-x86/bin, its runpath is ${ORIGIN}/../lib64, which
101 // is fine for finding host/linux-x86/lib64/libc++.so. When it's installed to
103 // argument has no effect when a static executable is produced.
/bionic/libc/kernel/
DREADME.md76 version to which they correspond. The format of a tag is
77 android-mainline-XXX, where XXX is the kernel version. For example,
85 It is expected that a kernel update should only be performed on a valid tag.
86 For testing purposes, it is possible that you can use the top of tree
94 source tree if there is a kernel source tree already checked out:
100 and import them if there is no checked out kernel source tree:

123