Bug 495469

Summary: aligned_alloc and posix_memalign missing MALLOC_TRACE with returned pointer
Product: [Developer tools] valgrind Reporter: Paul Floyd <pjfloyd>
Component: memcheckAssignee: Paul Floyd <pjfloyd>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.24 GIT   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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