On Sat Jun 21 17:26:05 2025 +0000, Jinoh Kang wrote:
Instead of removing the reserved range, we should split the range around the mapped area. So if the memory looks like this:
[-- reserved range --] [preloader]
Then, instead of giving up the reserved range, we could simply split the reservation, like this:
[-- reserved range --] [-- rsvd 1 --][preloader][-- rsvd 2 --]
Note that the preloader *itself* now acts as part of the reservation, as its address won't be reused by mmap(2)—just like other reservations. See https://gitlab.winehq.org/wine/wine/-/merge_requests/6/diffs?commit_id=02247... for how this could be done.
That ... is an improvement over just omitting the range, but I'm not sure if that amount of code is worth it. Maybe it's better to just document the workaround on the wiki.
(According to someone on IRC, latest Valgrind can run Wine's instructions properly, it's just that Debian's Valgrind is three years old.)