-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unexpected asan error when call malloc and then free #1790
Comments
If it was malloc() that triggered this I guess you need to double check the compiler flags for |
I found it was free() that triggered the error, but i don't know the asan is implemented, so it is hard to debug. |
I can take a look at the patch at least. Is it reproducible on QEMU? |
I just tried the same code on QEMU ,but i can't reproduce it. |
Perhaps it's the shadow area that is the problem. |
I can help to test and verify if you have any clue. @jenswi-linaro |
The compiler adds code to check all loads and stores. Once In this case you need to find out which line of code is actually calling panic() and perhaps the stack trace too and it shouldn't be too hard to tell what's wrong. |
The stack trace was to be expected to tell the which line of code is wrong, but it seems that there is no useful stack trace info in my case. |
@jenswi-linaro I found it, the following line cause the problem, i enabled the memset for debug use.
|
There you have it, |
@jenswi-linaro Disable the |
@jenswi-linaro i deep into the following code:
I found that memset will trigger the panic in asan.c, and that is why i can't get the line of code which triger the asan check error.
I haven't seen any clue about stack in asan, could you help about this problem? |
Please test with #1799, it hopefully fixes the problem. |
OK, i will test it later, thank you. |
@jenswi-linaro it fixes the problem, thank you, i will close the issue. |
My platform config :
CFG_CORE_SANITIZE_KADDRESS ?= y
and the in the start code:
then i get the following error message:
Is there anything wrong with the bget lib when the asan is enabled? Can anyone help to explain?
Thank you.
The text was updated successfully, but these errors were encountered: