|
From: Patrick O. <pat...@in...> - 2006-10-18 12:42:18
|
Hi all, while debugging an unknown, rather large application I found use-after-free errors pretty quickly thanks to valgrind, but then trying to make sense of them took a while until I realized that the free() occurred in another thread while the failing one was iterating over the same data. So the real problem was not incorrect tracking of resources, but rather missing locking. It would have been easier to recognize that if valgrind had included some kind of thread identifier in its output, something like "invalid memory access in thread #1: ... memory was freed by thread #2: ...". What do you think? How difficult would it be to add that? -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. |