public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Roger Phillips via Libc-help <libc-help@sourceware.org>
Cc: Roger Phillips <heidegg@hotmail.com>
Subject: Re: Getting more info about a heap corruption
Date: Wed, 14 Jun 2023 11:24:59 +0200	[thread overview]
Message-ID: <87a5x2s8es.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <SJ0PR06MB86417146389FD199D4F76B6CAA5AA@SJ0PR06MB8641.namprd06.prod.outlook.com> (Roger Phillips via Libc-help's message of "Wed, 14 Jun 2023 07:21:06 +0000")

* 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


  reply	other threads:[~2023-06-14  9:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  7:21 Roger Phillips
2023-06-14  9:24 ` Florian Weimer [this message]
2023-06-14 10:13   ` Roger Phillips
2023-06-14 10:17     ` Florian Weimer
2023-06-14 10:21       ` Roger Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5x2s8es.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=heidegg@hotmail.com \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).