Bug 477044 - Valgrind complains about wld_mmap being in Text segment
Summary: Valgrind complains about wld_mmap being in Text segment
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-15 13:23 UTC by Davide Beatrici
Modified: 2024-01-15 08:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Valgrind log (3.12 KB, text/plain)
2023-11-15 13:23 UTC, Davide Beatrici
Details
Segments (3.55 KB, text/plain)
2023-11-18 13:07 UTC, Davide Beatrici
Details
Segments (working) (3.49 KB, text/plain)
2023-11-20 21:23 UTC, Davide Beatrici
Details

Note You need to log in before you can comment on or make changes to this bug.
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