Bug 514297

Summary: Track madvise MADV_GUARD_INSTALL in address space manager
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.25 GIT   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=511717
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Mark Wielaard 2026-01-07 21:18:33 UTC
glibc 2.42+ (with linux 6.13+) uses MADV_GUARD_INSTALL to setup
stack guard pages. valgrind currently isn't able to track this and
such guard pages also don't show up in /proc maps (only in /proc
pagemap since linux 6.14). For now valgrind fails a madvise
MADV_GUARD_INSTALL syscall with EINVAL. This causes glibc to fall
back to mprotect PROT_NONE	which valgrind is able to track.
See https://bugs.kde.org/show_bug.cgi?id=511717

It would be better to track madvise MADV_GUARD_INSTALL using the address space manager.