[Bug 49312] New: wineg++ - "invalid program stack in 64-bit code" on exception catching - regression
https://bugs.winehq.org/show_bug.cgi?id=49312 Bug ID: 49312 Summary: wineg++ - "invalid program stack in 64-bit code" on exception catching - regression Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: dd-tom(a)web.de Distribution: --- Created attachment 67324 --> https://bugs.winehq.org/attachment.cgi?id=67324 full crash log Referencing this issue here: https://bugs.launchpad.net/ubuntu/+source/wine/+bug/1881293 When compiling the following C++ program with "wineg++ main.cpp": #include <stdexcept> #include <stdio.h> int main() { printf("start\n"); try { throw std::runtime_error("desc"); } catch (std::exception &ex) { printf("in catch\n"); } printf("end\n"); } Wine crashes with: Unhandled exception: assertion failed, invalid program stack in 64-bit code (0x00007f33f6c24781). The full log is attached. Tested with (not working): - Debian Bullseye and wine 5.0 (packaged) - wine 5.0 compiled from source on Debian Buster Regression since wine 4.0, tested working with: - Debian Buster and wine 4.0 (packaged) - wine 4.0 compiled from source on Debian Buster -- 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=49312 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|wineg++ - "invalid program |wineg++ - "invalid program |stack in 64-bit code" on |stack in 64-bit code" on |exception catching - |exception catching |regression | Keywords| |download, regression, | |source --- Comment #1 from Austin English <austinenglish(a)gmail.com> --- Can you run a regression test? https://wiki.winehq.org/RegressionTesting -- 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=49312 --- Comment #2 from Austin English <austinenglish(a)gmail.com> --- *** Bug 49313 has been marked as a duplicate of this bug. *** -- 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=49312 Jacek Caban <jacek(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek(a)codeweavers.com --- Comment #3 from Jacek Caban <jacek(a)codeweavers.com> --- Wine expects main() to be __cdecl now, so it's probably caused by f2a7405a09c66e4b9adc15d4e9b7379ed4c78f54 and it was needed so that components built with msvcrt use the same calling convention as ones that don't in (non-mingw build). The change is not needed any more because msvcrt has a separated entry point implementation now. It may be too late, through. -- 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=49312 --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- If the change is no longer needed, it could certainly be reverted. -- 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=49312 --- Comment #5 from dd-tom(a)web.de --- Created attachment 67325 --> https://bugs.winehq.org/attachment.cgi?id=67325 crash with __cdecl main After I changed the main method to: int __cdecl main() { I get a different error message, see log: Unhandled exception: assertion failed in 64-bit code (0x00007f06228db18b). Don't bother, that I changed to testing on ubuntu, I checked the error without cdecl is the same. I will try to do a bisect to find the regression. -- 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=49312 dd-tom(a)web.de changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |5.0 -- 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=49312 --- Comment #6 from dd-tom(a)web.de --- Bug seems fixed on current master. I am doing a bisect to find the first occurence and the 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.
https://bugs.winehq.org/show_bug.cgi?id=49312 --- Comment #7 from dd-tom(a)web.de --- Ignore my last comment about current master for now. Something strange happened on my build machine... -- 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=49312 --- Comment #8 from dd-tom(a)web.de --- Created attachment 67358 --> https://bugs.winehq.org/attachment.cgi?id=67358 Regression test result (git bisect) Here are my regression test results: * issue exists only when compiling with libunwind enabled * issue exists only for 64bit build * issue still exists on current master * doing a git bisect, the first bad commit is: d2e4a6fae0ddf95c7090fcb91548aa4b5242d88f Can you please check for anything suspicious? (Earlier I thought the issue was fixed on master, because I removed libunwind while optimizing the build time of my automated build script for doing the git bisect runs. I attached my build setup, test programs and bisect log.) -- 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=49312 dd-tom(a)web.de changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d2e4a6fae0ddf95c7090fcb9154 | |8aa4b5242d88f Distribution|--- |Debian -- 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=49312 Vijay Kamuju <infyquest(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest(a)gmail.com --- Comment #9 from Vijay Kamuju <infyquest(a)gmail.com> --- Please check a fix has been committed. https://source.winehq.org/git/wine.git/commitdiff/167f188d71c75d88e3b74600b3... -- 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=49312 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |167f188d71c75d88e3b74600b3b | |da4688e70f984 --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> --- Hopefully fixed. -- 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=49312 --- Comment #11 from dd-tom(a)web.de --- I have to disappoint... I just ran the test for commit 167f188d71c75d88e3b74600b3bda4688e70f984 and it failed with the same error: "Unhandled exception: assertion failed in 64-bit code (0x00007f659e6057bb)." I also checked, that the last known working commit passes the test: 2002c22afa2a2ec0341ce5bb851be022760c99c5 -- 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=49312 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |z.figura12(a)gmail.com Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #12 from Zebediah Figura <z.figura12(a)gmail.com> --- (In reply to dd-tom from comment #11)
I have to disappoint...
I just ran the test for commit 167f188d71c75d88e3b74600b3bda4688e70f984 and it failed with the same error: "Unhandled exception: assertion failed in 64-bit code (0x00007f659e6057bb)."
I also checked, that the last known working commit passes the test: 2002c22afa2a2ec0341ce5bb851be022760c99c5
Reopening. -- 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=49312 --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Did you properly reconfigure and rebuild ntdll? -- 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=49312 --- Comment #14 from dd-tom(a)web.de --- I used my test script from the attached zip file. I built wine from scratch (fresh clone of git repo). Is that enough? -- 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=49312 --- Comment #15 from Alexandre Julliard <julliard(a)winehq.org> --- Ok it's probably a slightly different libunwind breakage then. You could try linking the app with -static-libgcc also, or play with the ntdll link order (at least for me, linking libgcc before libunwind also seems to help). -- 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=49312 --- Comment #16 from dd-tom(a)web.de --- Linking the app with -static-libgcc does not solve the problem. Can anyone else confirm the error? -- 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=49312 --- Comment #17 from Zebediah Figura <z.figura12(a)gmail.com> --- I cannot reproduce this bug: zeb(a)terabithia:~$ /bridge/git/wine64/tools/winegcc/wineg++ test.cpp -o test.exe --wine-objdir /bridge/git/wine64/ zeb(a)terabithia:~$ wine test.exe.so start in catch end zeb(a)terabithia:~$ uname -r 4.19.160-1-MANJARO gcc 10.2.0, libunwind 1.3.1. -- 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=49312 --- Comment #18 from dd-tom(a)web.de --- You inspired me to try a different distro/gcc version: I was using debian buster with: libunwind 1.2.1-10~deb10u1 gcc 8.3.0-6 and I tried ubuntu now with: libunwind 1.2.1-9build1 gcc 9.3.0-1ubuntu2 and with ubuntu the error does not appear. So I assume the compiler version is relevant. libunwind is basically the same version except distro fixes. -- 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=49312 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)dawncrow.de --- Comment #19 from André H. <nerv(a)dawncrow.de> --- Can't reproduce with wine-7.0-rc3 (+git) and gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 -- 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=49312 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |NOTOURBUG --- Comment #20 from Alexandre Julliard <julliard(a)winehq.org> --- Assuming some kind of compiler bug then. Please reopen if you can reproduce with a recent compiler. -- 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