Re: Strange report from leaks
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Mon, 2 Mar 2009 18:25:58 -0800 (PST)
On Mar 2, 6:19 pm, Golden California Girls <gldncag...@xxxxxxxxxxx>
wrote:
Got a strange pair of reports from leaks.
Just wondering how it could be that a block of memory reported leaked could be
on the next check not be reported leaked in fact getting a zero blocks leaked.
Then later it reported a leak again. I attached gdb and attaching gdb make the
leak go away!
Just wondering if anyone has seen this kind of behavior before.
Question is idle curiosity, my real leak problem is solved.
It was, in fact, not leaked but referenced in a way that your tool
could not detect. Since the tool detected no references, it reported
the block leaked. Later, when the reference the tool could not detect
was used in a way the tool could detect, the block was no longer
leaked.
As a silly proof-of-concept, consider this: You allocate a block. You
write that block's address to a file on disk, but do not have any
pointers in memory to it. Is the block now leaked? If no, how can the
tool tell? If yes, what happens when the address is read from disk --
is it still leaked?
DS
.
- References:
- Strange report from leaks
- From: Golden California Girls
- Strange report from leaks
- Prev by Date: Strange report from leaks
- Next by Date: Re: write and data interleaving
- Previous by thread: Strange report from leaks
- Next by thread: Re: Strange report from leaks
- Index(es):
Relevant Pages
|