Bug 485134

Summary: [PATCH] vgcore files unusable in gdb / does not load debug symbols
Product: [Developer tools] valgrind Reporter: Bernhard Übelacker <bernhardu>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: pjfloyd
Priority: NOR    
Version First Reported In: 3.16.1   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: add_auxiliary_vector_to_vgcore_files.patch

Description Bernhard Übelacker 2024-04-06 15:24:36 UTC
Created attachment 168219 [details]
add_auxiliary_vector_to_vgcore_files.patch

It seems gcc defaults now quite some time to create pie executables.
And gdb seems to rely for core files of such executables to contain an auxv section.

This was found in this Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993018
There are more details about reproducing it.

I investigated back then and came up with an patch which makes valgrind write the auxv section into the core file.
Unfortuantely forgot about it and now trying to upstream this.
Would such a patch be acceptable? If yes, how should I proceed?

Patch is attached and it seems still to apply to current valgrind 3.20.0 in Debian Trixie/testing.