Bug 477044

Summary: Valgrind complains about wld_mmap being in Text segment
Product: [Developer tools] valgrind Reporter: Davide Beatrici <kde>
Component: memcheckAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: austinenglish, pjfloyd
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Valgrind log
Segments
Segments (working)

Description Davide Beatrici 2023-11-15 13:23:44 UTC
Created attachment 163185 [details]
Valgrind log

The issue appeared with Wine commit ac1761d1dae8bf114a05e28ed6886deba6c2c860.

Related: https://bugs.winehq.org/show_bug.cgi?id=55889
Comment 1 Paul Floyd 2023-11-16 15:58:03 UTC
What exactly changed in that commit?

Valgrind uses a lot of memory. If the guest tries ot mmap to an address that Valgrind is using that's going to fail.
Comment 2 Davide Beatrici 2023-11-16 20:21:26 UTC
The preloader is now built as PIE (Position Independent Executable).
Comment 3 Paul Floyd 2023-11-18 10:21:46 UTC
Can you post the first SHOW_SEGMENTS (between <<< and >>>) that you get with 'valgrind -d {whatever command}'
Comment 4 Davide Beatrici 2023-11-18 13:07:24 UTC
Created attachment 163261 [details]
Segments
Comment 5 Davide Beatrici 2023-11-20 21:23:44 UTC
Created attachment 163322 [details]
Segments (working)

A user on freedesktop's GitLab can't reproduce the issue on openSUSE Tumbleweed, which currently provides Valgrind 3.21 and Wine 8.20.

I attached the segments reported on his machine.

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1938#note_2172483