From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <26c8145b85f3393b89c8032d5e5c4766@quintile.net> References: <26c8145b85f3393b89c8032d5e5c4766@quintile.net> Date: Mon, 22 Feb 2010 10:01:18 -0800 Message-ID: Subject: Re: [9fans] leak(1) problem From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Topicbox-Message-UUID: d82174ea-ead5-11e9-9d60-3106f5b1d025 > 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