[compiler-rt] r266931 - [asan] Add __strdup interceptor.

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 11:40:04 PDT 2016


On 21 April 2016 at 19:05, Evgenii Stepanov <eugeni.stepanov at gmail.com> wrote:
> it's hard to say w/o seeing the full output, but it looks like the
> allocation stack trace is
>  #0 0x60e8f in strdup
> /home/linaro/buildbot/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:560
>   #1 0xe9e1f in _fini
> (/home/linaro/buildbot/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/asan/ARMHFLinuxConfig/TestCases/Output/strdup_oob_test.cc.tmp+0xe9e1f)

Sorry, swapping too much today. Here's the output:

==26892==ERROR: AddressSanitizer: heap-buffer-overflow on address
0xb5a007f5 at pc 0x000c5448 bp 0xbeef44d0 sp 0xbeef44d4
READ of size 1 at 0xb5a007f5 thread T0
    #0 0xc5447 in main
/home/linaro/buildbot/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/asan/TestCases/strdup_oob_test.cc:18:11
    #1 0xb6cef631 in __libc_start_main
(/lib/arm-linux-gnueabihf/libc.so.6+0x17631)

0xb5a007f5 is located 1 bytes to the right of 4-byte region
[0xb5a007f0,0xb5a007f4)
allocated by thread T0 here:
    #0 0x60e8f in strdup
/home/linaro/buildbot/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:560
    #1 0xe9e1f in _fini
(/home/linaro/buildbot/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/asan/ARMHFLinuxConfig/TestCases/Output/strdup_oob_test.cc.tmp+0xe9e1f)


More information about the llvm-commits mailing list