|
From: Tom H. <to...@co...> - 2011-03-23 23:58:11
|
On 23/03/11 20:05, Stefan Kost wrote: > Thanks for the sugestions, the test is trivial and seems to be correct. Many > people looked at it. The reason why I posted this to the valgrind list was that > I was wondering why the test result is different when running it under valgrind. > > But I guess thats not easy to explain. No, it's very easy to explain if you accept that valgrind is telling the truth about printing values that are in a freed block. Under valgrind the freed block will be deliberately overwritten when it is freed. When valgrind is not in use it will probably still have the old values in if it has only just been freed. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |