After compiling and linking my program with gcc 11.4 using -fsanitize=address and -g, I am getting an AddressSanitizer report on the console, but no backtrace like usual. Running under gdb does not give different results, and it does not stop when the message is generated so that I can’t get a backtrace that way either.
Here is the entire message produced:
==3287022==ERROR: AddressSanitizer: heap-use-after-free on address 0x6020000028b0 at pc 0x7ffff6e64ac2 bp 0x7ffff1ec68e0 sp
0x7ffff1ec68d0
READ of size 8 at 0x6020000028b0 thread T2
I have used AddressSanitizer successfully with this program before. I’d fix a reported error using the backtrace to find the issue, recompile, and re-run — rinse and repeat. When I got to this error though, there’s no backtrace at all so I’m not sure how to proceed.
How can I get a backtrace and figure out where this is happening?