native shared library crashes if C++ exceptions are used on Ubuntu 20.04 Wine64 build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wine (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This problem appears only on Ubuntu 20.04 with Wine 5.0 installed from Ubuntu repository. If I build Wine 5.0 myself or install Wine 4.0.4 from WineHQ repository, then there is no problem, so I assume the problem is in Ubuntu 20.04 build of Wine.
I have written a shared library for our application using Winelib project, which calls native Linux API. C++ is used. Crash happens on first C++ exception thrown.
App which shows the problem:
#include <stdexcept>
#include <stdio.h>
int main() {
try {
throw std::runtime_
} catch (std::exception &ex) {
}
}
built with:
g++ -c -fPIC t.cpp
../
where '../wine-git_64/' is directory where I cloned and built Wine64 5.0 stable to get wineg++ linker.
Run the application as:
wine tt.exe.so
It prints 'start', then it crashes. The application crashes in Wine (Wine dialog pops-up), so I think Ubuntu is not aware of this crash. Contents of Wine crash dialog (backtrace.txt):
Unhandled exception: assertion failed, invalid program stack in 64-bit code (0x00007fa3b70d
Register dump:
rip:00007fa3b7
rax:0000000000
rsi:0000000000
r11:0000000000
Stack dump:
0x000000000022f1f0: 0000000000000000 00007fa3b6f0db45
0x000000000022f200: 0000000000000000 00007fa3b6f0db45
0x000000000022f210: 0000000000000000 000000000022f370
0x000000000022f220: 00007fa3b646a2d4 00007fa3b6f0eae1
0x000000000022f230: 00007fa3b6f11cac 00007fa3b6f0eae1
0x000000000022f240: 00007fa3b6473608 0000000000001265
0x000000000022f250: 0000000000000049 00000000000000d1
0x000000000022f260: 000000000000038b 0000000000000000
0x000000000022f270: fffffffe7fffffff ffffffffffffffff
0x000000000022f280: ffffffffffffffff ffffffffffffffff
0x000000000022f290: ffffffffffffffff ffffffffffffffff
0x000000000022f2a0: ffffffffffffffff ffffffffffffffff
Backtrace:
=>0 0x00007fa3b70d118b execlp+
1 0x00007fa3b70b0859 execlp+
2 0x00007fa3b6eff667 __floattisf+
3 0x00007fa3b6f0d281 __extendsftf2+
0x00007fa3b70d118b execlp+
Modules:
Module Address Debug info Name (21 modules)
ELF 7b000000- 7b0e2000 Deferred kernelbase<elf>
\-PE 7b010000- 7b0e2000 \ kernelbase
ELF 7b400000- 7b68b000 Deferred kernel32<elf>
\-PE 7b420000- 7b68b000 \ kernel32
ELF 7bc00000- 7befb000 Deferred ntdll<elf>
\-PE 7bc20000- 7befb000 \ ntdll
ELF 7c000000- 7c005000 Deferred <wine-loader>
ELF 7fa3b6182000- 7fa3b61b2000 Deferred libtinfo.so.6
ELF 7fa3b61b2000- 7fa3b61db000 Deferred libncurses.so.6
ELF 7fa3b64d8000- 7fa3b64ec000 Deferred libnss_files.so.2
ELF 7fa3b6ed5000- 7fa3b6efc000 Deferred liblzma.so.5
ELF 7fa3b6efc000- 7fa3b6f17000 Dwarf libgcc_s.so.1
ELF 7fa3b6f17000- 7fa3b7066000 Deferred libm.so.6
ELF 7fa3b7066000- 7fa3b7083000 Deferred libunwind.so.8
ELF 7fa3b7085000- 7fa3b708b000 Deferred libdl.so.2
ELF 7fa3b708b000- 7fa3b727d000 Dwarf libc.so.6
ELF 7fa3b727d000- 7fa3b72a0000 Deferred libpthread.so.0
ELF 7fa3b72a6000- 7fa3b72bc000 Deferred tt<elf>
\-PE 7fa3b72b0000- 7fa3b72bc000 \ tt
ELF 7fa3b72bc000- 7fa3b745f000 Dwarf libwine.so.1
ELF 7fa3b7461000- 7fa3b7491000 Deferred ld-linux-
Threads:
process tid prio (all id:s are in hex)
0000000e services.exe
00000023 0
0000001a 0
00000013 0
00000010 0
0000000f 0
00000011 plugplay.exe
00000017 0
00000016 0
00000012 0
00000018 winedevice.exe
00000020 0
0000001d 0
0000001c 0
0000001b 0
00000019 0
0000001e explorer.exe
00000029 0
00000028 0
00000027 0
0000001f 0
00000021 winedevice.exe
00000026 0
00000025 0
00000024 0
00000022 0
00000039 (D) Z:\home\
0000003a 0 <==
System information:
Wine build: wine-5.0 (Ubuntu 5.0-3ubuntu1)
Platform: x86_64
Version: Windows 7
Host system: Linux
Host version: 5.4.0-33-generic
=======
Output in console:
start
wine: Assertion failed at address 00007FA3B70D118B (thread 003a), starting debugger...
003a:err:
summary: |
- native shared library crashes if C++ exceptions are used on Ubuntu 20.05 + native shared library crashes if C++ exceptions are used on Ubuntu 20.04 Wine64 build |
Maybe the problem is in versions of libgcc used for build and the one distributed with Ubuntu.