Searched refs:to (Results 1 – 25 of 66) sorted by relevance
123
3 This document describes how to verify incoming assembler libc routines.7 * Update the routine, run the bionic unit tests to verify the routine doesn't8 have any bugs. See the [Testing](#Testing) section for details about how to14 the [Unwind Info](#unwind-info) section for details about how to verify this.16 When benchmarking, it's best to verify on the latest Pixel device supported.17 Make sure that you benchmark both the big and little cores to verify that28 Locking to a specific cpu:33 The bionic benchmarks are used to verify the performance of changes to39 and pushed on to the device. The commands below show how to do this.57 command to work, you need to change directory to one of the above[all …]
2 This document describes how to verify the native memory allocator on Android.3 This procedure should be followed when upgrading or moving to a new allocator.4 A small minor upgrade might not need to run all of the benchmarks, however,10 It is important to note that there are two modes for a native allocator11 to run in on Android. The first is the normal allocator, the second is12 called the svelte config, which is designed to run on memory constrained14 add this line to the `BoardConfig.mk` for the given target:26 a native allocator needs to implement.29 These are functions that are used to implement a memory leak detector34 call to an allocation function (malloc/free/etc). When a call[all …]
1 # When to use which `#define`3 Using `#ifdef` or equivalents is common when writing portable code. Which to use5 related to Android.9 If your code is specific to Android's C library, bionic, use `__BIONIC__`. This13 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't20 of the OS and needs to behave differently on the host than on the device.22 remember that it is possible -- if unusual -- to use bionic on the host).27 `__ANDROID_API__` to test which version you're building against. This is31 One thing to note (if your code may also be built as part of the OS itself) is[all …]
6 that use `off_t` to working on files no larger than 2GiB.8 Android does not require the `_LARGEFILE_SOURCE` macro to be used to make12 Android also does not require the `_LARGEFILE64_SOURCE` macro to be used13 to make `off64_t` and corresponding functions such as `ftruncate64` available.17 There are a couple of exceptions to note. Firstly, `off64_t` and the single42 If your code stops compiling when you move to NDK r15 or later, removing every43 definition of `_FILE_OFFSET_BITS=64` will restore the behavior you used to have:46 aren't aware that `_FILE_OFFSET_BITS` is set. You might also have to47 remove references to `__USE_FILE_OFFSET64` --- this is the internal51 to double check:[all …]
25 few instructions. TLS variables belonging to dlopen'ed shared objects, on the other hand, may be38 According to Drepper, variant 2 was motivated by backwards compatibility, and variant 1 was designed40 an executable, the linker needs to know where an executable's TLS segment is relative to the TP so44 Each thread has a "Dynamic Thread Vector" (DTV) with a pointer to each module's TLS block (or NULL47 expected to point immediately at the DTV pointer, whereas in variant 2, the DTV pointer's offset50 The DTV's "generation" field is used to lazily update/reallocate the DTV when new modules are loaded57 When a C/C++ file references a TLS variable, the toolchain generates instructions to find its70 A GD access can refer to a TLS variable anywhere. To access a variable `tls_var` using the72 call to a `__tls_get_addr` function provided by libc.100 `R_TLS_DTPMOD` is a dynamic relocation to the index of the module containing `tls_var`, and[all …]
6 *What problem is fdsan trying to solve? Why should I care?*8 …to manifest as *use-after-close* and *double-close*. These errors are direct analogues of the memo…38 … (e.g. suppose thread two was saving user data to disk when a third thread came in and opened a so…43 …to detect and/or prevent file descriptor mismanagement by enforcing file descriptor ownership. Lik…45 …to set a 64-bit closure tag on a file descriptor. The tag consists of an 8-bit type byte that iden…55 …- Upon detecting an error, emit a warning to logcat, generate a tombstone, and then continue execu…63 The likelihood of fdsan catching a file descriptor error is proportional to the percentage of file …65 ### Using fdsan to fix a bug68 Let's look at a simple contrived example that uses sleeps to force a particular interleaving of thr…89 err(1, "good failed to write?!");[all …]
7 for changes related to native code loading in various Android releases.13 You can see the current status with respect to POSIX in the form of tests:38 * Thread cancellation (`pthread_cancel`). Unlikely to ever be implemented74 * Bug fixes to handling of UTF-8 U+fffe/U+ffff and code points above U+10ffff.78 corresponding pointer argument, leading to obscure errors. The scanf family97 …* <signal.h> support for `sigaction64_t` and `sigset64_t` allowing LP32 access to real-time signals108 * Passing a null `FILE*` or `DIR*` to libc is now detected at runtime and135 * Passing an invalid `pthread_t` to libc is now detected at runtime and272 but there are likely to be more in future because of Project Treble.276 As part of a long-term goal to remove the global thread list,[all …]
3 This document details important changes related to native code13 you need to have the “binutils” package installed for readelf,20 will be tied to an app's target API level:25 * At the affected API level and above, we’ll refuse to load the library.34 toasts help bring some visibility to the issues before it's too late.36 ## Changes to library dependency resolution41 had to call `dlopen` or `System.loadLibrary` on all transitive45 to topologically sort your libraries and load them in reverse order.47 If you need to support Android devices running OS48 versions older than JB-MR2, you might want to consider[all …]
12 This documentation is about making changes to bionic itself.23 `cos(3)` in a separate library to save space in the days before shared29 that the dynamic linker replaces with pointers to its own implementation at34 The C++ ABI support functions. The C++ compiler doesn't know how to implement42 has a `DT_INTERP` entry that says "use the following program to start me". On45 into memory and resolving references to symbols (so that when your code tries to46 jump to `fopen(3)`, say, it lands in the right place).88 # generate_uapi_headers.sh script should be used to go from a kernel tree to90 # details. The update_all.py script should be used to regenerate bionic's108 # This is where we keep the hacks necessary to build BSD source[all …]
3 This library provides an async_safe implementation for formatting and writing log messages to logd.5 Note that the liblog implementation connects a single socket to logd and uses a RWLock to manage6 it among threads, whereas these functions connect to liblog for each log message. While it's7 beneficial to have this lock-free and therefore async_safe mechanism to write to logd, connecting8 a socket for each message does not scale well under load. It was also determined to be too9 costly to connect a socket for each thread as some processes, such as system_server, have over 100
19 "control" means (i) the power, direct or indirect, to cause the28 including but not limited to software source code, documentation33 not limited to compiled object code, generated documentation,34 and conversions to other media types.38 copyright notice that is included in or attached to the work46 separable from, or merely link (or bind by name) to the interfaces of,51 to that Work or Derivative Works thereof, that is intentionally52 submitted to Licensor for inclusion in the Work by the copyright owner53 or by an individual or Legal Entity authorized to submit on behalf of56 to the Licensor or its representatives, including but not limited to[all …]
7 This documentation describes how to enable this feature on Android N or later33 Before, a realloc from one size to a smaller size would not update the34 backtrace related to the allocation. Starting in P, every single realloc49 to find memory corruption occuring to a region before the original allocation.51 When the allocation is freed, the guard is checked to verify it has not been61 on 64 bit systems to make sure that the allocation returned is aligned64 This option adds a special header to all allocations that contains the guard75 to find memory corruption occuring to a region after the original allocation.77 When the allocation is freed, the guard is checked to verify it has not been84 This option adds a special header to all allocations that contains[all …]
7 This documentation describes how to enable this feature on API level10 is not guaranteed to work at all.15 On these old versions of the OS, you must be able to set system properties16 using the setprop command from the shell. This requires the ability to45 When enabled, this value creates a special header to all allocations52 might cause timeouts when trying to start a device.56 by a call to get\_malloc\_leak\_info (see README\_api.md for details).72 When enabled, this value creates a special header to all allocations83 When the allocation is freed, both of these guards are verified to contain84 the expected patterns. If not, then an error message is printed to the log.[all …]
3 Malloc debug can be used to get information on all of the live allocations5 used to gather this data from a process. This tracking can be enabled using8 The function to gather the data:12 *info* is set to a buffer allocated by the call that contains all of14 *overall\_size* is set to the total size of the buffer returned. If this17 *total\_memory* is set to the sum of all allocation sizes that are live at20 *backtrace\_size* is set to the maximum number of backtrace entries23 In order to free the buffer allocated by the function, call:38 *backtrace\_size* as returned by the original call to43 incorrectly set to the number of frames in the backtrace.[all …]
8 on top of [Google Benchmark](https://github.com/google/benchmark) with some additions to organize20 `--benchmark_filter=getpid` to run just the benchmarks with "getpid" in their name.34 the file will be found as relative to the current directory. If the option specifies the full path35 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 use85 The `spawn/` subdirectory has a few benchmarks measuring the time used to start simple programs96 spent in the spawned process. The real-time is probably more useful, and it is the figure used to99 Locking the CPU frequency seems to improve the results of these benchmarks significantly, and it106 Google Benchmark uses two settings to control how many times to run each benchmark, "iterations" and[all …]
40 stpcpy(char *to, const char *from) in stpcpy() argument42 for (; (*to = *from) != '\0'; ++from, ++to); in stpcpy()43 return(to); in stpcpy()
40 strcpy(char *to, const char *from) in strcpy() argument42 char *save = to; in strcpy()44 for (; (*to = *from) != '\0'; ++from, ++to); in strcpy()
43 wcpcpy(wchar_t * __restrict to, const wchar_t * __restrict from) in wcpcpy() argument46 for (; (*to = *from); ++from, ++to); in wcpcpy()47 return(to); in wcpcpy()
8 unmodified kernel headers in order to get rid of many annoying30 Contains various Python and shell scripts used to get and re-generate33 The tools to get/parse the headers:71 Before running the command to import the headers, make sure that you have73 to determine which directory to use as the destination directory.75 After running lunch, run this command to import the headers into the android81 Run this command to automatically download the latest version of the headers87 Next, run this command to copy the parsed files to bionic/libc/kernel/uapi:92 After this, you will need to build/test the tree to make sure that these
3 This document describes format of /system/etc/ld.config.txt file. This file can be used to customize9 1. Mappings - maps executable locations to sections14 This part of the document maps location of an executable to a section. Here is an example28 # The following line maps section to a dir. Binaries ran from this location will use namespaces35 # When this flag is set to true linker will set target_sdk_version for this binary to41 # This property can be used to declare additional namespaces. Note that there is always the default79 # and links it to default namespace83 # This defines what libraries are allowed to be loaded from ns1
5 // This is used for bionic on (host) Linux to bootstrap our linker embedded into51 // We need to access Bionic private headers in the linker.110 // We need to access Bionic private headers in the linker.246 // -shared is used to overwrite the -Bstatic and -static flags triggered by enabling256 // we are going to link libc++_static manually because257 // when stl is not set to "none" build system adds libdl258 // to the list of static libraries which needs to be274 // Insert an extra objcopy step to add prefix to symbols. This is needed to prevent gdb294 // reference to __gnu_Unwind_Find_exidx, which isn't sufficient to pull in the strong definition369 // libgcc.a are made static to ld-android.so. This in turn ensures that libraries that[all …]
4 Malloc hooks allows a program to intercept all allocation/free calls that8 There are two ways to enable these hooks, set a special system54 called, then the allocated memory is set to zero.67 When malloc hooks is enabled, then the hook pointers are set to70 the original hook function to do allocations. If the app does not do this,109 For example, to enable malloc hooks for the google search box:115 of 32. This meant that to create a wrap property with the name of the app, it116 was necessary to truncate the name to fit. On O, property names can be117 an order of magnitude larger, so there should be no need to truncate the name
40 # Translate to the kernel calling convention and swap the 'tls' and 'child_tid' arguments.61 # We don't want anyone to unwind past this point.74 # We're the parent; nothing to do.
10 // Unless required by applicable law or agreed to in writing, software113 // Library to test gnu-styled hash123 // Library to test sysv-styled hash211 // In Android.mk to support zipped and aligned tests308 // This set of libraries is used to verify linker namespaces.316 // 4. Check that having access to shared library (libnstest_public.so)320 // libnstest_root.so (this should be local to the namespace)370 // This set of libraries is used to verify linker namespaces for allow all374 // 1. Check that namespace a exposes libnstest_ns_a_public1 to377 // 2. Check that namespace b exposes all libraries to namespace a.[all …]
1 # 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.13 # syscalls to modify IDs30 # syscalls to modify times40 # syscalls to change machine various configurations