Bug 512037 - malloc trace does not print free size or alignment
Summary: malloc trace does not print free size or alignment
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-13 13:56 UTC by Paul Floyd
Modified: 2025-11-14 08:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Floyd 2025-11-13 13:56:00 UTC
Just one example of this:

#define FREE_SIZED(, fnname, vg_replacement, tag) \

contains

       MALLOC_TRACE(#fnname "(%p)\n", p ); \

That should be

       MALLOC_TRACE(#fnname "(%p, %z)\n", p, size ); \

I also see that there are lots of casts to ULong and %llu format strings. No casts and %zu should be enough. Lastly some of the uses of MALLOC_TRACE add "size" and "al" strings before the values. If they are never ambiguous I'll remove them.
Comment 1 Paul Floyd 2025-11-14 08:32:00 UTC
commit dd3ac939d11bc11366aefb488c2321217bb6c2a7 (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Thu Nov 13 20:32:28 2025 +0100

    Bug 512037 - malloc trace does not print free size or alignment