[Bug 58293] New: Regression caused by switch to realloc which doesn't zero added memory
http://bugs.winehq.org/show_bug.cgi?id=58293 Bug ID: 58293 Summary: Regression caused by switch to realloc which doesn't zero added memory Product: Wine Version: 10.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wintrust Assignee: wine-bugs(a)winehq.org Reporter: twhitehead(a)gmail.com Distribution: --- Created attachment 78644 --> http://bugs.winehq.org/attachment.cgi?id=78644 Log showing run with and without reverting 6db69d0 under wine 10.7 In wine 8 `LibOVR.dll` (the shim) would load `LibOVRRT32_1.dll` (the Oculus API). In wine 9 and later this is no longer the case. Reverting 6db69d0 (wintrust: Use CRT allocation function) makes it work again. Looking over this commit I expect the issue is the switch from ``` static void* WINTRUST_ReAlloc(void *ptr, DWORD cb) __WINE_ALLOC_SIZE(2); static void* WINTRUST_ReAlloc(void *ptr, DWORD cb) { return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ptr, cb); } ``` which zeros added memory to realloc which does not. Presumably this is resulting in some field being populated with garbage, and that makes `LibOVR.dll` unhappy when it verifies the signatures on `LibOVRRT32_1.dll`. I put more details and a test program in the following github repo https://github.com/twhitehead/issue-wine-ovrf -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 --- Comment #1 from Tyson Whitehead <twhitehead(a)gmail.com> --- That should have been https://github.com/twhitehead/issue-wine-ovr -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 Tyson Whitehead <twhitehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24(a)gmail.com, | |twhitehead(a)gmail.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.
http://bugs.winehq.org/show_bug.cgi?id=58293 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86-64 |x86 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #2 from Alex Henrie <alexhenrie24(a)gmail.com> --- I feel honored that you produced such a detailed tribute to my error. Please try this patch: https://gitlab.winehq.org/wine/wine/-/merge_requests/8171 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |6db69d0281543a240e1dd5ec0b0 | |b7d841dc8f4cf Keywords| |regression, source URL| |https://github.com/twhitehe | |ad/issue-wine-ovr -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 --- Comment #3 from Tyson Whitehead <twhitehead(a)gmail.com> --- Yup. That has it. `LibOVRRT32_1.dll` get loaded under wine 10.7 patched with you patch like it used to under wine 8 ``` 0024:trace:wintrust:WinVerifyTrust returning 00000000 ... 0024:trace:loaddll:build_module Loaded L"Z:\\home\\tyson\\issue-wine-ovr\\LibOVRRT32_1.dll" at 7A280000: native ... 29/05 07:40:37.992 {INFO} [Kernel:Default] [CAPI] LibOVR module is located at Z:\home\tyson\issue-wine-ovr\LibOVRRT32_1.dll 29/05 07:40:37.993 {INFO} [Kernel:System] Graceful shutdown: OnThreadDestroy 29/05 07:40:37.993 {INFO} [Kernel:System] Graceful shutdown: OnSystemDestroy 29/05 07:40:37.993 {INFO} [Kernel:System] Graceful shutdown: Stopping logger ... ``` Thanks very much! :) -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |c04dc136dd7a5aa679dcdd22535 | |fd96e25426174 --- Comment #4 from Alex Henrie <alexhenrie24(a)gmail.com> --- Fixed by https://gitlab.winehq.org/wine/wine/-/commit/c04dc136dd7a5aa679dcdd22535fd96... Thanks again for the bug report. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 --- Comment #5 from Tyson Whitehead <twhitehead(a)gmail.com> --- NP. Thanks for the quick fix! -- 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.
http://bugs.winehq.org/show_bug.cgi?id=58293 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.10. -- 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