https://bugs.kde.org/show_bug.cgi?id=211031

--- Comment #15 from Austin English <austinengl...@gmail.com> ---
As of wine-4.6, wine now supports building its dlls with mingw:
https://source.winehq.org/git/wine.git/commitdiff/a3cf86a18446e9d7df4e045b83d3aa3d9193512a

the plan is to eventually make that the default (not sure if there's a timeline
for that yet, but I would guess that before next stable release is likely).

When compiling wine with mingw support, stacktraces are pretty poor. As a
comparison, here's the same test with native gcc (8.3.0) versus mingw
(i686-w64-mingw32-gcc (Gentoo 9.2.0-r2 p3) 9.2.0). With
dlls/comctl32/tests/edit.c in wine-4.20-213-gddec23013e

native:
==10945== Invalid read of size 2
==10945==    at 0x4F0C401: LocalLock (memory.c:661)
==10945==    by 0x63FAE1A: EDIT_LockBuffer (edit.c:1195)
==10945==    by 0x640216D: EDIT_WindowProc (edit.c:4608)
==10945==    by 0x55FB4A7: ??? (in
/home/austin/wine-valgrind-no-mingw/dlls/user32/user32.dll.so)
==10945==    by 0x55FBA94: call_window_proc (winproc.c:249)
==10945==    by 0x55FCEFE: WINPROC_CallProcAtoW (winproc.c:609)
==10945==    by 0x55FDB4D: WINPROC_call_window (winproc.c:956)
==10945==    by 0x55C38CE: call_window_proc (message.c:2225)
==10945==    by 0x55C6EB6: send_message (message.c:3294)
==10945==    by 0x55C9B02: SendMessageA (message.c:3517)
==10945==    by 0x5016FDF: test_EM_GETHANDLE (edit.c:3041)
==10945==    by 0x5018F22: func_edit (edit.c:3411)
==10945==    by 0x50A0581: run_test (test.h:637)
==10945==    by 0x50A0E08: main (test.h:721)
==10945==  Address 0x4952a58 is 16 bytes after a recently re-allocated block of
size 32 alloc'd
==10945==    at 0x7BC6656F: notify_alloc (heap.c:260)
==10945==    by 0x7BC695B5: RtlAllocateHeap (heap.c:1725)
==10945==    by 0x59177B7: create_family (freetype.c:1594)
==10945==    by 0x59278A4: load_font_list_from_cache (freetype.c:1768)
==10945==    by 0x59283B9: WineEngInit (freetype.c:4458)
==10945==    by 0x5928CCD: DllMain (gdiobj.c:693)
==10945==    by 0x594011C: __wine_spec_dll_entry (dll_entry.c:44)
==10945==    by 0x7BC6AA95: ??? (in
/home/austin/wine-valgrind-no-mingw/dlls/ntdll/ntdll.dll.so)
==10945==    by 0x7BC6EC1A: MODULE_InitDLL (loader.c:1331)
==10945==    by 0x7BC6EEBB: process_attach (loader.c:1425)
==10945==    by 0x7BC6EDFD: process_attach (loader.c:1411)
==10945==    by 0x7BC6EDFD: process_attach (loader.c:1411)
==10945==    by 0x7BC6EDFD: process_attach (loader.c:1411)
==10945==    by 0x7BC715B9: LdrInitializeThunk (loader.c:3782)
==10945==    by 0x7BC9C556: attach_thread (signal_i386.c:2746)
==10945==    by 0x7BC991C3: ??? (in
/home/austin/wine-valgrind-no-mingw/dlls/ntdll/ntdll.dll.so)

mingw:
==15488== Invalid read of size 2
==15488==    at 0x7BC74A86: RtlInitNlsTables (locale.c:760)
==15488==    by 0x7125EB11: ???
==15488==    by 0x7126254F: ???
==15488==    by 0x71262871: ???
==15488==    by 0x7BC6AAD5: ??? (in
/home/austin/wine-valgrind-mingw/dlls/ntdll/ntdll.dll.so)
==15488==    by 0x7BC6EC5A: MODULE_InitDLL (loader.c:1331)
==15488==    by 0x7BC6EEFB: process_attach (loader.c:1425)
==15488==    by 0x7BC6EE3D: process_attach (loader.c:1411)
==15488==    by 0x7BC6EE3D: process_attach (loader.c:1411)
==15488==    by 0x7BC715F9: LdrInitializeThunk (loader.c:3782)
==15488==    by 0x7BC9D12A: attach_thread (signal_i386.c:2746)
==15488==    by 0x7BC99D97: ??? (in
/home/austin/wine-valgrind-mingw/dlls/ntdll/ntdll.dll.so)
==15488==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==15488== 

interestingly, mingw shows RtlInitNlsTables while gcc doesn't (but that's
likely it, since RtlInitNlsTables is in dlls/ntdll/locale.c at line 760 and
that's the ??? in the gcc output.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to