Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASAN detecting heap-use-after free but empty stack #1071

Open
hharshith15 opened this issue Mar 27, 2019 · 0 comments
Open

ASAN detecting heap-use-after free but empty stack #1071

hharshith15 opened this issue Mar 27, 2019 · 0 comments

Comments

@hharshith15
Copy link

hharshith15 commented Mar 27, 2019

Hi ,
I am using asan on CLANG 5.0 on Freebsd it is able to detect heap-use-after-free only when I disable optimisation but no stack trace . Below is the output . And I also see some CHECK failed . . Seems to be the problem with unwinder ,tried with fast_unwind_on_fatal=0 but the stack didn't point to valid function calls . Used -fno-omit-frame-pointer as well . Since we are building our custom toolchain , please point to patch if any that can help overcome this issue .
Please help me through.

=================================================================
==52036==ERROR: AddressSanitizer: heap-use-after-free on address 0x602000000075 at pc
sp 0x7fffffffe7f8
READ of size 1 at 0x602000000075 thread T16777215

0x602000000075 is located 5 bytes inside of 10-byte region [0x602000000070,0x60200000007a)
==52036==AddressSanitizer CHECK failed: ../compiler-t/lib/asan/asan_descriptions.cc:176
"((id)) != (0)" (0x0, 0x0)
#0 0x5b1a76 (/var/tmp/abcd+0x5b1a76)
#1 0x5c602f (/var/tmp/abcd+0x5c602f)
#2 0x552e60 (/var/tmp/abcd+0x552e60)
#3 0x555ccf (/var/tmp/abcd+0x555ccf)
#4 0x5af2a1 (/var/tmp/abcd+0x5af2a1)
#5 0x5aec81 (/var/tmp/abcd+0x5aec81)
#6 0x5af88a (/var/tmp/abcd+0x5af88a)
#7 0x68836c (/var/tmp/abcd+0x68836c)
#8 0x688705 (/var/tmp/abcd+0x688705)
#9 0xb21c7b (/var/tmp/abcd+0xb21c7b)
#10 0x54b28e (/var/tmp/abcd+0x54b28e)
#11 0x802d7efff ()

Corresponding addr2line
>addr2line -e abcd -a 0x5b1a76 0x5c602f 0x552e60 0x555ccf 0x5af2a1 0x5aec81 0x5af88a 0x68836c 0x688705 0xb21c7b 0x54b28e 0x802d7efff
0x00000000005b1a76
../compiler-rt/lib/asan/asan_rtl.cc:69
0x00000000005c602f
../compiler-rt/lib/sanitizer_common/sanitizer_termination.cc:79
0x0000000000552e60
../compiler-rt/lib/asan/asan_descriptions.cc:176
0x0000000000555ccf
../compiler-rt/lib/asan/asan_errors.cc:508
0x00000000005af2a1
../compiler-rt/lib/asan/asan_report.cc:177
0x00000000005aec81
../compiler-rt/lib/asan/asan_report.cc:421
0x00000000005af88a
../compiler-rt/lib/asan/asan_rtl.cc:131
0x000000000068836c

Thanks
Harshith H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant