Thanks for the answer! Do you mean just LD_PRELOAD libasan without linking against it? Regarding less optimized libc, do you know if Ubuntu produces such versions for their packages? Regards ________________________________ From: Florian Weimer Sent: Wednesday, June 14, 2023 9:24 AM To: Roger Phillips via Libc-help Cc: Roger Phillips Subject: Re: Getting more info about a heap corruption * Roger Phillips via Libc-help: > Problem is that variables needed for this check like victim, bck and > next are optimized out and thus not accessible in gdb. Only av and its > contents are accessible. I cannot use asan binaries as it is a > production test. Changing environment variables is possible though. You could use LD_PRELOAD to install debugging malloc (such as the ASAN allocator), or use LD_PRELOAD=libc.so.6 with a build of glibc (from the same sources as the system glibc version) with reduced optimization. I think there are also GDB scripts out there that traverse the various heap data structures and report inconsistencies. Thanks, Florian