Address sanitizer does not detect obvious leak
aspdqqprgcgp@spornkuller.de
aspdqqprgcgp@spornkuller.de
Mon Jan 25 21:44:24 GMT 2021
On 25.01.21 22:16, aspdqqprgcgp--- via Gcc-help wrote:
> Therefore I would like to understand what is
> going on here.
So, I've poked at the code and it is MUCH weirder than I thought. I
traced it to some assertions (which pass in the code). Ultimately I can
make the address sanitizer not find the leak by adding:
int a = 1;
printf("%p\n", &a);
at the end of the test body. Which makes no sense whatsoever.
And even worse, when I tried to compare the assembly between one piece
of code that had the aforementioned two lines vs. the one that did not,
the generated assembly was *significantly* different in so many places
that I cannot trace what exactly the reason is there.
Does any of this make any sense? I am so confused.
Cheers,
Joe
More information about the Gcc-help
mailing list