mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Srinivasan J <srinidpdk@gmail.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Dumping process heap from the core file
Date: Sat, 5 Jun 2021 11:50:54 -0400	[thread overview]
Message-ID: <20210605155053.GF13220@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAEbeQ+oPc7SCYeJVyazo9_wZUfr6R=MWm9wGsALeVji-qiFQEQ@mail.gmail.com>

On Thu, Jun 03, 2021 at 07:39:54AM +0530, Srinivasan J wrote:
> Hi,
>     Is there an easy way to dump the heap from the process core which
> is using musl-libc? The process is using musl-libc version v1.1.24. I
> see that there is a _dump_heap() function, but that's not up to date.
> I am thinking about using _dump_heap() as reference. But any other
> suggestions are welcome.

The mallocng heap structures are actually more walkable. There is
intentionally no public interface for doing this, but I have some
debug code left over from development that you could link into
static-linked programs with a particular known musl/mallocng version
or patch into libc.so for debugging purposes. I'll dig it up and post
it. Ping me if I forget about it.

Rich

  reply	other threads:[~2021-06-05 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  2:09 Srinivasan J
2021-06-05 15:50 ` Rich Felker [this message]
2021-06-23  3:51   ` Srinivasan J
2021-06-23 18:32     ` Rich Felker

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=20210605155053.GF13220@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=srinidpdk@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).