[Bug 49640] New: Loading certain builtin/Winelib DLLs twice may crash
https://bugs.winehq.org/show_bug.cgi?id=49640 Bug ID: 49640 Summary: Loading certain builtin/Winelib DLLs twice may crash Product: Wine Version: 5.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: bshanks(a)codeweavers.com Distribution: --- When certain "builtin"/Winelib DLLs/EXEs get loaded, then unloaded, then loaded again (by two calls to GetFileVersionInfoSize() for example), the second load may result in a crash. The underlying problem is that dlopen_dll() in dlls/ntdll/unix/loader.c assumes that dlopen() is returning a freshly-mapped copy of the file. POSIX doesn't guarantee this though, and if the file was already previously loaded by Wine, and relocation fixups were applied, those fixed-up headers will be still be present. map_so_dll then applies fixups again, and that's where I'm seeing the crash. In particular, when map_so_dll is building the import directory, I see that imports->Name already has the delta applied to it from the previous load. An EXE that has this problem is the "steam.exe.so" shipped with Proton, I believe since it links to a C++ library it will not be unloaded by a dlclose() call (see https://stackoverflow.com/questions/38869657/dlclose-not-unloading-so-file-w...) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49640 Rémi Bernon <rbernon(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon(a)codeweavers.com --- Comment #1 from Rémi Bernon <rbernon(a)codeweavers.com> --- Created attachment 67843 --> https://bugs.winehq.org/attachment.cgi?id=67843 RTLD_NOLOAD patch I had this patch lying around since I spent some time on fake dlls, it may help working around the issue. It's probably not very portable though, as RTLD_NOLOAD is marked as glibc 2.2 specific. I don't know if there's the same kind of thing with other libc. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49640 Anya <maniikarabera(a)protonmail.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maniikarabera(a)protonmail.ch -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49640 Andrew Eikum <aeikum(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum(a)codeweavers.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49640 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget(a)codeweavers.com Keywords| |patch -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49640 soredake <broaden_acid002(a)simplelogin.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|broaden_acid002(a)simplelogin | |.com | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla