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 (t...@compton.nu) http://compton.nu/ ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users