9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] leak(1) problem
Date: Mon, 22 Feb 2010 10:01:18 -0800	[thread overview]
Message-ID: <dd6fe68a1002221001u45185d6elf0beb4f04d277044@mail.gmail.com> (raw)
In-Reply-To: <26c8145b85f3393b89c8032d5e5c4766@quintile.net>

> Leak only reports strdup(2) as being the source of the leak. I added
> a setmalloctag(2) call directly after the call to strdup(2) but
> leak continues to report the strdup(2) address rather than its
> bounding function.

There are many calls to strdup in your program,
and you didn't tag the one that is causing the leak.
That is, you guessed who was calling strdup but
did not guess correctly.  Instead of guessing, you
can put a call to setmalloctag inside strdup and
then leak will show you the offending call site.

Russ


      reply	other threads:[~2010-02-22 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 17:43 Steve Simon
2010-02-22 18:01 ` Russ Cox [this message]

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=dd6fe68a1002221001u45185d6elf0beb4f04d277044@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /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 NNTP newsgroup(s).