summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-02-25 13:21:04 -0800
committerElliott Hughes <enh@google.com>2019-02-26 12:22:38 -0800
commita21f6cca067f6194944a85639b63b7ddad99996d (patch)
tree49cf5363e76892ba21655495b564849020e7f8fa /libc/malloc_hooks/malloc_hooks.cpp
parente65558a0a4ad1f4aee5d63d0661b02f910e0cbd8 (diff)
Log when malloc functions fail.
This shouldn't happen often, and resulting failures can be hard to debug. From the bionic unit tests now: W libc : malloc(18446744073709551615) failed: returning null pointer W libc : calloc(18446744073709551615, 100) failed: returning null pointer W libc : calloc(1, 18446744073709551615) failed: returning null pointer W libc : calloc(18446744073709551615, 18446744073709551615) failed: returning null pointer W libc : calloc(2, 18446744073709551615) failed: returning null pointer W libc : calloc(18446744073709551615, 2) failed: returning null pointer W libc : memalign(4096, 18446744073709551615) failed: returning null pointer W libc : realloc(0x0, 18446744073709551615) failed: returning null pointer W libc : realloc(0x75d7526070, 18446744073709551615) failed: returning null pointer W libc : reallocaray(0x0, 9223372036854775812, 2) failed: returning null pointer W libc : reallocaray(0x0, 2, 9223372036854775812) failed: returning null pointer Bug: http://b/12821450 Test: ran tests Change-Id: Ib176814404f4ba1297416dd3e1edd721bf59aeed
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions