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

Strange Error Report when heap-use-after-free #702

Closed
yyh-graphsql opened this issue Aug 1, 2016 · 2 comments
Closed

Strange Error Report when heap-use-after-free #702

yyh-graphsql opened this issue Aug 1, 2016 · 2 comments

Comments

@yyh-graphsql
Copy link

==24137== ERROR: AddressSanitizer: heap-use-after-free on address 0x60040000b0f8 at pc 0x4f4d65 bp 0x7ffff28bfbe0 sp 0x7ffff28bfbd8
READ of size 8 at 0x60040000b0f8 thread T2
#3 0x4f07b4 in zk_callback(zhandle, int, int, char const_, void_) /home/xxx.cpp:56*
0x60040000b0f8 is located 8 bytes inside of 16-byte region [0x60040000b0f0,0x60040000b100)
freed by thread T2 here:
#0 0x7ffff4e609ea (/usr/lib64/libasan.so.0+0x119ea)
#1 0x4f07d0 in zk_callback(zhandle, int, int, char const
, void_) /home/_xxx.cpp:57*
#2 0x5f3690 in do_foreach_watcher /home/xxx/zk_hashtable.c:279
#3 0x5f3690 in deliverWatchers /home/xxx/zk_hashtable.c:321

The report above shows that the free and read is in the same thread, but actually the code must run the read code first, then can run the free code (read is on the line 56, free is on the line 57). The binary is compiled with -O0. I cannot figure out why this strange report come out.

@yugr
Copy link

yugr commented Aug 1, 2016

Could you attach a repro case?

@morehouse
Copy link
Contributor

No response for over a year. Closing.

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

3 participants