|
From: Dan-George F. <dan...@gm...> - 2011-11-08 22:18:04
Attachments:
hello-world-leak.txt
|
Hi! I just compiled a 64bit Valgrind 3.7 on OS X 10.7 hoping to use it for a new project. Wanting to try it out, I ran it on a project I just started that just allocated and de-allocated a matrix (correctly) and it said that there are weird leaks somewhere in the ImageLoader namespace/class belonging do /usr/bin/dyld. I've attached the leaky program and Valgrind's output below. To me it seems that either OS X's dynamic linker leaks (which I find kind of unlikely) or there is a bug in Valgrind. Thanks, Dan |
|
From: WAROQUIERS P. <phi...@eu...> - 2011-11-09 08:59:40
|
>Hi! > >I just compiled a 64bit Valgrind 3.7 on OS X 10.7 hoping to use it for >a new project. >Wanting to try it out, I ran it on a project I just started that just >allocated and de-allocated a matrix (correctly) and it said that there >are weird leaks somewhere in the ImageLoader namespace/class belonging >do /usr/bin/dyld. > >I've attached the leaky program and Valgrind's output below. To me it >seems that either OS X's dynamic linker leaks (which I find kind of >unlikely) or there is a bug in Valgrind. > >Thanks, >Dan In the trace you give, I only see reports of 'still reachable'. This means that there is memory which has been allocated, not de-allocated and Valgrind can still find pointers to this memory. When a process exits, in many cases, it is useless to spend cpu to free the memory you have in any case to keep till the end. So, this is why "leaks" are splitted in 3 kinds: * definitely leaked: not deallocated, not finding a pointer to it anywhere * possibly leaked: not deallocated, found a pointer pointing inside the block * still reachable: not deallocated, found a pointer pointer to the block. The manual describes in details the concept of definitely leaked/possibly leaked/still reachable. So, in summary, I suspect this is neither a bug in the OS X dynamic linker, nor in Valgrind. Just a subtility of the "leak concept". Philippe ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |