Bug 495469 - aligned_alloc and posix_memalign missing MALLOC_TRACE with returned pointer
Summary: aligned_alloc and posix_memalign missing MALLOC_TRACE with returned pointer
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (other bugs)
Version First Reported In: 3.24 GIT
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-28 09:46 UTC by Paul Floyd
Modified: 2024-10-28 19:37 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 2024-10-28 09:46:38 UTC
aligned_alloc has

       MALLOC_TRACE("aligned_alloc(al %llu, size %llu)", \
                (ULong)alignment, (ULong)size ); \

bit it's missing

MALLOC_TRACE(" = %p\n", mem ); \

Similar issue with posix_memalign (and the unloved valloc)

There are also a few failure paths that should also print "= 0\n"
Comment 1 Paul Floyd 2024-10-28 19:37:34 UTC
I'll add some testcases after 3.24 is done.

commit f29bc61a22097c4e5ca966ad874647ef596f0327 (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Mon Oct 28 20:36:17 2024 +0100

    Bug 495469 - aligned_alloc and posix_memalign missing MALLOC_TRACE with returned pointer