- 12 Jul, 2012 1 commit
-
-
The Android Automerger authored
-
- 02 Jul, 2012 1 commit
-
-
Andrew Hsieh authored
Since linker is built with -fvisibility=hidden rtld_db_dlactivity() if hidden from gdb. Unhide it otherwise gdb may not know linker activity and rescan solib Change-Id: Ia8cd8d9738c6ea5696ba2ef0ebf2cf783f9ca70a
-
- 20 Jun, 2012 1 commit
-
-
The Android Automerger authored
-
- 19 Jun, 2012 2 commits
-
-
Andy McFadden authored
-
Ben Cheng authored
Change-Id: I8f72c5c7e23960b13fc53e2354cd74aca8aac3c0
-
- 11 Jun, 2012 1 commit
-
-
The Android Automerger authored
-
- 06 Jun, 2012 1 commit
-
-
Jeff Brown authored
Bug: 6615693 Change-Id: Ibfddc0de3fa2a882f7d0238ab797e5b29296b54b
-
- 03 Jun, 2012 1 commit
-
-
The Android Automerger authored
-
- 01 Jun, 2012 1 commit
-
-
Iliyan Malchev authored
This patch is a rewrite of libc.debug.malloc = 10 (chk_malloc). It provides the same features as the original (poison freed memory, detect heap overruns and underruns), except that it provides more debugging information whenever it detects a problem. In addition to the original features, the new chk_malloc() implementation detects multiple frees within a given range of the last N allocations, N being configurable via the system property libc.debug.malloc.backlog. Finally, this patch keeps track of all outstanding memory allocations. On program exit, we walk that list and report each outstanding allocation. (There is support (not enabled) for a scanner thread periodically walks over the list of outstanding allocations as well as the backlog of recently-freed allocations, checking for heap-usage errors.) Feature overview: 1) memory leaks 2) multiple frees 3) use after free 4) overrun Implementation: -- for each allocation, there is a: 1) stack trace at the time the allocation is made 2) if the memory is freed, there is also a stack trace at the point 3) a front and rear guard (fence) 4) the stack traces are kept together with the allocation -- the following lists and maintained 1) all outstanding memory allocations 3) a backlog of allocations what are freed; when you call free(), instead of actually freed, the allocation is moved to this backlog; 4) when the backlog of allocations gets full, the oldest entry gets evicted from it; at that point, the allocation is checked for overruns or use-after-free errors, and then actually freed. 5) when the program exits, the list of outstanding allocations and the backlog are inspected for errors, then freed; To use this, set the following system properties before running the process or processes you want to inspect: libc.malloc.debug.backlog # defaults to 100 libc.malloc.debug 10 When a problem is detected, you will see the following on logcat for a multiple free: E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 BYTES MULTIPLY FREED! E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 ALLOCATED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c658 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d80 /system/lib/libc.so E/libc ( 7233): #03 pc 4009647c /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 FIRST FREED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c7d2 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d94 /system/lib/libc.so E/libc ( 7233): #03 pc 40096490 /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 NOW BEING FREED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c6ac /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d94 /system/lib/libc.so E/libc ( 7233): #03 pc 400964a0 /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so The following for a heap overrun and underrun: E/libc ( 7233): +++ REAR GUARD MISMATCH [10, 11) E/libc ( 7233): +++ ALLOCATION 0x404b9198 SIZE 10 HAS A CORRUPTED REAR GUARD E/libc ( 7233): +++ ALLOCATION 0x404b9198 SIZE 10 ALLOCATED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c658 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d80 /system/lib/libc.so E/libc ( 7233): #03 pc 40096438 /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so E/libc ( 7233): +++ ALLOCATION 0x404b9198 SIZE 10 FREED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c7d2 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d94 /system/lib/libc.so E/libc ( 7233): #03 pc 40096462 /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so E/libc ( 7233): +++ ALLOCATION 0x404b9358 SIZE 10 HAS A CORRUPTED FRONT GUARD E/libc ( 7233): +++ ALLOCATION 0x404b9358 SIZE 10 ALLOCATED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c658 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d80 /system/lib/libc.so E/libc ( 7233): #03 pc 400964ba /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so E/libc ( 7233): +++ ALLOCATION 0x404b9358 SIZE 10 FREED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c7d2 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d94 /system/lib/libc.so E/libc ( 7233): #03 pc 400964e4 /system/bin/malloctest E/libc ( 7233): #04 pc 00016f24 /system/lib/libc.so The following for a memory leak: E/libc ( 7233): +++ THERE ARE 1 LEAKED ALLOCATIONS E/libc ( 7233): +++ DELETING 4096 BYTES OF LEAKED MEMORY AT 0x404b95e8 (1 REMAINING) E/libc ( 7233): +++ ALLOCATION 0x404b95e8 SIZE 4096 ALLOCATED HERE: E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** E/libc ( 7233): #00 pc 0000c35a /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #01 pc 0000c658 /system/lib/libc_malloc_debug_leak.so E/libc ( 7233): #02 pc 00016d80 /system/lib/libc.so E/libc ( 7233): #03 pc 0001bc94 /system/lib/libc.so E/libc ( 7233): #04 pc 0001edf6 /system/lib/libc.so E/libc ( 7233): #05 pc 0001b80a /system/lib/libc.so E/libc ( 7233): #06 pc 0001c086 /system/lib/libc.so E/libc ( 7233): #07 pc 40096402 /system/bin/malloctest E/libc ( 7233): #08 pc 00016f24 /system/lib/libc.so Change-Id: Ic440e9d05a01e2ea86b25e8998714e88bc2d16e0 Signed-off-by:
Iliyan Malchev <malchev@google.com>
-
- 31 May, 2012 1 commit
-
-
The Android Automerger authored
-
- 30 May, 2012 2 commits
-
-
Iliyan Malchev authored
libc.debug.malloc.program provides an additional level of control over which processes to enable libc.debug.malloc functionality for. The string value of libc.debug.malloc.program is matched against the program name; if the value of libc.debug.malloc.program is a substring of the program name, then malloc debug is applied to that program at whatever level libc.debug.malloc specifies. If lib.debug.malloc.program is not specified, then libc.debug.malloc has the same effect as before. For example, to enable libc.deubug.malloc = 10 only to the mediaserver, do the following: adb root # necessary for setprop adb setprop libc.debug.malloc.program mediaserver adb setprop libc.debug.malloc 10 adb kill -9 $(pid mediaserver) Change-Id: I6f01c12f033c8e2e015d73025369d7f1685ba200 Signed-off-by:
Iliyan Malchev <malchev@google.com>
-
Geremy Condra authored
-
- 25 May, 2012 1 commit
-
-
Ben Cheng authored
For example: @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree addr=0x5c3bfbd0 Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 2942 The addr=0x5c3bfbd0 part is new. Change-Id: I8670144b2b0a3a6182384150d762c97dfee5452f
-
- 24 May, 2012 2 commits
-
-
Ben Cheng authored
For example: @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree addr=0x5c3bfbd0 Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 2942 The addr=0x5c3bfbd0 part is new. Change-Id: I8670144b2b0a3a6182384150d762c97dfee5452f
-
Geremy Condra authored
This fix reads from /dev/urandom to get the required entropy. Bug: 6535492 Change-Id: Ibc2fec3f71a67607b608ad9b767b0b6504993c1d
-
- 10 May, 2012 1 commit
-
-
The Android Automerger authored
-
- 09 May, 2012 2 commits
-
-
Prajakta Gudadhe authored
Some SoCs that support NEON nevertheless perform better with a non-NEON than a NEON memcpy(). This patch adds build variable ARCH_ARM_USE_NON_NEON_MEMCPY, which can be set in BoardConfig.mk. When ARCH_ARM_USE_NON_NEON_MEMCPY is defined, we compile in the non-NEON optimized memcpy() even if the SoC supports NEON. Change-Id: Ia0e5bee6bad5880ffc5ff8f34a1382d567546cf9
-
The Android Automerger authored
-
- 08 May, 2012 1 commit
-
-
Ben Cheng authored
So that we can always get the full stack trace regardless of gcc's handling of the "noreturn" attribute associated with abort(). [cherry-picked from master] BUG:6455193 Change-Id: I0102355f5bf20e636d3feab9d1424495f38e39e2
-
- 30 Apr, 2012 1 commit
-
-
The Android Automerger authored
-
- 26 Apr, 2012 2 commits
-
-
Mike Lockwood authored
-
Nick Kralevich authored
By default, Android no longer compiles code using it's custom linker script /build/core/armelf.xsc. However, this causes problems for libc. Certain programs linked using older versions of GOLD expect libc.so to export __exidx_start and __exidx_end. Removing the custom linker script causes libc.so not to export those symbols. For now, continue using the old linker script, until we can figure out a better solution. Change-Id: Iaf002afd63a58b848818da24e5a4525620dc4d74
-
- 25 Apr, 2012 2 commits
-
-
Mike Lockwood authored
Change-Id: I29ec4aa4843b9308cbfa412df88e026e8475b715 Signed-off-by:
Mike Lockwood <lockwood@google.com>
-
The Android Automerger authored
-
- 23 Apr, 2012 1 commit
-
-
Nick Kralevich authored
The ARM static linker wasn't properly handling __exidx_start and __exidx_end symbols. Now that the static linker has been fixed, we don't need the dynamic linker to work around this problem. Change-Id: I041b94903609fafab33663a7d441a5e70b7ffcdd
-
- 19 Apr, 2012 1 commit
-
-
The Android Automerger authored
-
- 18 Apr, 2012 4 commits
-
-
Erik Gilling authored
Change-Id: I79de18d04b950c21b985d5ebc01cd3306a43d318 Signed-off-by:
Erik Gilling <konkers@android.com>
-
Erik Gilling authored
Change-Id: I38bb9498e18cb2b2e84a97487d4ad1e15fabd9d4 Signed-off-by:
Erik Gilling <konkers@android.com>
-
The Android Automerger authored
-
Evgeniy Stepanov authored
This change mirrors cd15bacf for statically-linked binaries. Change-Id: Id870832a50b37f0ef3e79e1ed03ed31390bfc9ef
-
- 17 Apr, 2012 1 commit
-
-
The Android Automerger authored
-
- 16 Apr, 2012 9 commits
-
-
Elliott Hughes authored
Change-Id: I8184302daf61814d26c837f9920b4e68d96d7f65
-
Elliott Hughes authored
Change-Id: I3854de8f4cddaf344444efa6f9da027642a237d9
-
Elliott Hughes authored
Change-Id: Ifc5a10d9c2f7764ad80d64cc552aad81d5fbf5eb
-
Elliott Hughes authored
* commit 'ff219e57': bionic: fix NULL parameter failure in getcwd()
-
Elliott Hughes authored
* commit '418e647a': libstdc++: Fix x86 thread-safe one-time-construction implementation.
-
Elliott Hughes authored
* commit '4994deae': Bionic: Fix wrong prototype of system call clock_nanosleep
-
Elliott Hughes authored
* commit '7b8666e6': bionic: Fix wrong prototype of system call getresuid/getresgid
-
Elliott Hughes authored
* commit '6435d27f': bionic: fix NULL parameter failure in getcwd()
-
Elliott Hughes authored
-