|
From: Philippe W. <phi...@sk...> - 2014-04-03 16:38:41
|
On Wed, 2014-04-02 at 22:25 -0400, Emanuel Schorsch wrote: > I recently came across the error message: "Address 0x%llx "is not > stack'd, malloc'd or (recently) free'd%s\n" and was confused for a > second until I realized the not didn't apply to the free'd. I think the current message is correct, and that your change would make it incorrect. If the address was really recently freed, then in this case, the above message is *not* given. Instead, if the address is (recently) freed, the message given is something like: Invalid read of size 1 at 0x........: main (big_blocks_freed_list.c:34) Address 0x........ is 2,000 bytes inside a block of size 900,000 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (big_blocks_freed_list.c:20) In other words, as long as the freed block is in the free list, valgrind can determine the block was (recently) freed and will output a message telling a freed block was accessed. If the freed block is not anymore in the free list block (because the free list volume was exceeded), then valgrind cannot make a very precise message, and outputs the If the block is not in the free list anymore (because the free list volume was exceeded), then valgrind cannot make a "precise" diagnostic and then outputs: "Address 0x%llx "is not stack'd, malloc'd or (recently) free'd%s\n" If you believe that the above is not matching your specific case, then the best is to provide a small test case producing the "wrong message" for which you would expect the changed message. Philippe |