Skip to content

Backtrace crashes in Wine with target i686-pc-windows-gnu #122154

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Bytekeeper opened this issue Mar 7, 2024 · 7 comments · Fixed by rust-lang/backtrace-rs#588 or #122306
Closed

Backtrace crashes in Wine with target i686-pc-windows-gnu #122154

Bytekeeper opened this issue Mar 7, 2024 · 7 comments · Fixed by rust-lang/backtrace-rs#588 or #122306
Labels
C-bug Category: This is a bug. O-windows Operating system: Windows O-windows-gnu Toolchain: GNU, Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) (IA-32) T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@Bytekeeper
Copy link

I tried this code:

fn main() {
    std::backtrace::Backtrace::force_capture();
}

running
cargo r --target i686-pc-windows-gnu

I expected to see this happen: Nothing

Instead, this happened:
wine: Unhandled page fault on read access to 726F735F at address 7AADD340 (thread 0734), starting debugger...

Running with
cargo r --target x86_64-pc-windows-gnu
using the 64bit target, no crash happens, as expected.

Meta

rustc --version --verbose:

rustc 1.76.0 (07dca489a 2024-02-04)
binary: rustc
commit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce
commit-date: 2024-02-04
host: x86_64-unknown-linux-gnu
release: 1.76.0
LLVM version: 17.0.6
@Bytekeeper Bytekeeper added the C-bug Category: This is a bug. label Mar 7, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 7, 2024
@workingjubilee workingjubilee added O-windows Operating system: Windows O-windows-gnu Toolchain: GNU, Operating system: Windows T-libs Relevant to the library team, which will review and decide on the PR/issue. O-x86_32 Target: x86 processors, 32 bit (like i686-*) (IA-32) labels Mar 7, 2024
@Noratrieb
Copy link
Member

Would be helpful to get a backtrace of the crash.
@ChrisDenton maybe you have ideas

@Bytekeeper
Copy link
Author

Bytekeeper commented Mar 8, 2024

@Nilstrieb Of course!
This is what windbg gave me:

002c:fixme:winediag:loader_init wine-staging 8.21 is a testing version containing experimental patches.
...
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7ab3d340 ESP:00a8bf88 EBP:00a8bfd0 EFLAGS:00010246(  R- --  I  Z- -P- )
 EAX:00000003 EBX:011b0554 ECX:726f735f EDX:00000004
 ESI:00a8c060 EDI:726f735f
Stack dump:
0x00000000a8bf88:  00000003 00a8bfb0 7ab6e52b 7ab3e5da
0x00000000a8bf98:  00a8c030 00000047 000096b9 00a8c060
0x00000000a8bfa8:  011b0594 00000003 00a8bfd0 7ab3e4d4
0x00000000a8bfb8:  011b0594 0009180d 00000013 019209c8
0x00000000a8bfc8:  00000001 00a8c060 00a8c020 7ab3e5da
0x00000000a8bfd8:  00a8c060 00000001 00453cb3 7ab3efa1
Backtrace:
=>0 0x0000007ab3d340 in dbghelp (+0xd340) (0x00000000a8bfd0)
  1 0x0000007ab3e5da in dbghelp (+0xe5da) (0x00000000a8c020)
  2 0x0000007ab40c3f in dbghelp (+0x10c3f) (0x00000000a8c090)
  3 0x0000007ab40eb7 in dbghelp (+0x10eb7) (0x00000000a8c100)
  4 0x0000007ab4120b in dbghelp (+0x1120b) (0x00000000a8c1c0)
  5 0x0000007ab41cbe in dbghelp (+0x11cbe) (0x00000000a8c260)
  6 0x0000007ab41cbe in dbghelp (+0x11cbe) (0x00000000a8c300)
  7 0x0000007ab41cbe in dbghelp (+0x11cbe) (0x00000000a8c3a0)
  8 0x0000007ab41cbe in dbghelp (+0x11cbe) (0x00000000a8c440)
  9 0x0000007ab41cbe in dbghelp (+0x11cbe) (0x00000000a8c4e0)
  10 0x0000007ab41cbe in dbghelp (+0x11cbe) (0x00000000a8c580)
  11 0x0000007ab3d96e in dbghelp (+0xd96e) (0x00000000a8c6b0)
  12 0x0000007ab428c8 in dbghelp (+0x128c8) (0x00000000a8c730)
  13 0x0000007ab439a4 in dbghelp (+0x139a4) (0x00000000a8c840)
  14 0x0000007ab65bd4 in dbghelp (+0x35bd4) (0x00000000a8c8f0)
  15 0x0000007ab51fdd in dbghelp (+0x21fdd) (0x00000000a8cb50)
  16 0x0000007ab42b58 in dbghelp (+0x12b58) (0x00000000a8f180)
  17 0x0000007ab33f86 in dbghelp (+0x3f86) (0x00000000a8f1f0)
  18 0x0000007ab342b3 in dbghelp (+0x42b3) (0x00000000a8f8e0)
  19 0x0000007ab6dba3 in dbghelp (+0x3dba3) (0x00000000a8f960)
  20 0x00000000423131 std::backtrace::Backtrace::trace+0x329() in test (0x00000000a8fdf4)
  21 0x00000000423131 std::backtrace::Backtrace::trace_unsynchronized<std::backtrace::{impl#4}::create::{closure_env
#0}>+0x329() in test (0x00000000a8fdf4)
  22 0x00000000423131 std::backtrace::Backtrace::create+0x381() in test (0x00000000a8fdf4)
  23 0x00000000422da3 std::backtrace::Backtrace::force_capture+0x13() in test (0x00000000a8fe00)
  24 0x00000000402191 in test (+0x2191) (0x00000000a8fe24)
  25 0x00000000401759 in test (+0x1759) (0x00000000a8fe30)
  26 0x000000004015df in test (+0x15df) (0x00000000a8fe3c)
  27 0x00000000401653 in test (+0x1653) (0x00000000a8fe4c)
  28 0x000000004214de std::rt::call_once<(), (dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + cor
e::panic::unwind_safe::RefUnwindSafe)>+0x5() in test (0x00000000a8feac)
  29 0x000000004214de std::rt::do_call<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::pa
nic::unwind_safe::RefUnwindSafe), i32>+0x5() in test (0x00000000a8feac)
  30 0x000000004214de std::rt::try<i32, &(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::p
anic::unwind_safe::RefUnwindSafe)>+0x5() in test (0x00000000a8feac)
  31 0x000000004214de std::rt::catch_unwind<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + cor
e::panic::unwind_safe::RefUnwindSafe), i32>+0x5() in test (0x00000000a8feac)
  32 0x000000004214de std::rt::{closure#2}+0x5() in test (0x00000000a8feac)
  33 0x000000004214de std::rt::do_call<std::rt::lang_start_internal::{closure_env#2}, isize>+0x8() in test (0x000000
00a8feac)
  34 0x000000004214de std::rt::try<isize, std::rt::lang_start_internal::{closure_env#2}>+0x8() in test (0x00000000a8
feac)
  35 0x000000004214de std::rt::catch_unwind<std::rt::lang_start_internal::{closure_env#2}, isize>+0x8() in test (0x0
0000000a8feac)
  36 0x000000004214de std::rt::lang_start_internal+0x8e() in test (0x00000000a8feac)
  37 0x00000000401628 in test (+0x1628) (0x00000000a8fed4)
  38 0x000000004021ee in test (+0x21ee) (0x00000000a8fef8)
  39 0x000000004012f0 in test (+0x12f0) (0x00000000a8ff38)
  40 0x0000007bf08b00 in kernel32 (+0x28b00) (0x00000000a8ff58)
  41 0x0000007bfa56cf in ntdll (+0x556cf) (0x00000000a8ff6c)
  42 0x0000007bfa6bf5 in ntdll (+0x56bf5) (0x00000000a8ffec)
0x0000007ab3d340 dbghelp+0xd340: mov (%edi), %edi
Wine-dbg>quit
wine: Unhandled page fault on read access to 726F735F at address 7AB3D340 (thread 0138), starting debugger...

Please note that I got a crash from a different wine version (sorry, can't recall which one) as well.

@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 8, 2024
@workingjubilee
Copy link
Member

@Bytekeeper The current Wine stable version is 9.0. Please try the latest stable Wine.

@workingjubilee
Copy link
Member

workingjubilee commented Mar 9, 2024

@Bytekeeper Also, it's not clear from your report that you actually have full 32-bit Windows support installed. It is not enough to simply have Wine installed to get that. You have to have a fully and correctly configured multilib setup. The Wine 9.0 release does significant work to reduce the need for that. Do other 32-bit Windows applications run on the system in question and successfully perform crash reporting with dbghelp?

@Bytekeeper
Copy link
Author

Bytekeeper commented Mar 9, 2024

Yes, I have a good setup - I run a lot of 32-bit applications (mostly Starcraft 1.16.1 and 32-bit applications connecting to it).
Here is an updated "program":

fn main() {
    println!("Yes, other 32-bit applications work");
    // std::backtrace::Backtrace::force_capture();
}
> file test.exe
test.exe: PE32 executable (console) Intel 80386, for MS Windows, 21 sections
> wine test.exe
Yes, other 32-bit applications work

This was with the same wine version, now let's retry with wine 9.0. I replaced the println with backtrace again:

> wine --version
wine-9.0
> wine test.exe
...
wine: Unhandled page fault on read access to 726F735F at address 7AAFD180 (thread 0024), starting debugger...

And the backtrace from winedbg:

Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:795fd180 ESP:00a8c194 EBP:00a8c1c4 EFLAGS:00010246(  R- --  I  Z- -P- )
 EAX:00000003 EBX:01440554 ECX:726f735f EDX:00000004
 ESI:00a8c228 EDI:726f735f
Stack dump:
0x00000000a8c194:  7962eb7b 000096b9 00a8c228 01440554
0x00000000a8c1a4:  01440594 00a8c1c4 795fe22c 01440594
0x00000000a8c1b4:  0009180d 016d09c8 00000001 00a8c228
0x00000000a8c1c4:  00a8c200 795fe37a 00a8c228 0247e5c8
0x00000000a8c1d4:  00001003 00000006 00000001 0000000d
0x00000000a8c1e4:  025e2e84 00000000 00a8c228 00000000
Backtrace:
=>0 0x000000795fd180 dwarf2_get_addr+0x5cc(word_size=<internal error>, ptr=<internal error>) [/wine/dlls/dbghelp/dwarf.c:373] in dbghelp (0x00000000a8c1c4)
  1 0x000000795fd180 dwarf2_fill_attr+0x790(ctx=<register EBX not accessible in this frame>, data=<register ECX not accessible in this frame>, attr=0000000000A8C228, abbrev_attr=<internal error>) [/wine/dlls/dbghelp/dwarf.c:683] in dbghelp (0x00000000a8c1c4)
  2 0x000000795fe37a dwarf2_find_attribute+0xfa(di=<is not available>, at=<internal error>, attr=0000000000A8C228) [/wine/dlls/dbghelp/dwarf.c:757] in dbghelp (0x00000000
a8c200)
  3 0x00000079600ae0 dwarf2_parse_inlined_subroutine+0x50(subpgm=<register ESI not accessible in this frame>, di=<register EBX not accessible in this frame>) [/wine/dlls/
dbghelp/dwarf.c:2134] in dbghelp (0x00000000a8c250)
  4 0x00000079600d7f dwarf2_parse_inlined_subroutine+0x2ef(subpgm=<register ESI not accessible in this frame>, di=<register EBX not accessible in this frame>) [/wine/dlls
/dbghelp/dwarf.c:2174] in dbghelp (0x00000000a8c2a0)
  5 0x000000796010fc dwarf2_parse_subprogram+0x33c(di=<register EBX not accessible in this frame>) [./wine/dlls/dbghelp/dwarf.c:2396] in dbghelp (0x00000000a8c348)
  6 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c3d0)
  7 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c3d0)
  8 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c458)
  9 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c458)
  10 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c4e0)
  11 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c4e0)
  12 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c568)
  13 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c568)
  14 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c5f0)
  15 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c5f0)
  16 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c678)
  17 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c678)
  18 0x000000795fd7b6 dwarf2_parse_compilation_unit+0x246(ctx=0000000001440554) [/wine/dlls/dbghelp/dwarf.c:2977] in dbghelp (0x00000000a8c790)
  19 0x00000079602798 dwarf2_load_CU_module+0x518(module_ctx=0000000000A8C854, module=<internal error>, sections=<internal error>, load_offset=0, thunks=0000000000000000, is_dwz=0) [/wine
-32-build/../wine/dlls/dbghelp/dwarf.c:4134] in dbghelp (0x00000000a8c7f4)
  20 0x00000079603854 dwarf2_parse+0x9b4(module=000000000105CD68, load_offset=0, thunks=0000000000000000, fmap=0000000001021F80) [/wine/dlls/dbghelp/dwarf.c:4262] in dbgh
elp (0x00000000a8c8e0)
  21 0x00000079625ed4 pe_load_dwarf+0x33(module=<internal error>) [/wine/dlls/dbghelp/pe_module.c:533] in dbghelp (0x00000000a8c96c)
  22 0x00000079625ed4 pe_load_debug_info+0x394(pcs=0000000000355628, module=<is not available>) [/wine/dlls/dbghelp/pe_module.c:513] in dbghelp (0x00000000a8c96c)
  23 0x000000796120a7 module_load_debug+0x117(module=000000000105CD68) [/wine/dlls/dbghelp/module.c:392] in dbghelp (0x00000000a8cbbc)
  24 0x00000079602a28 dwarf2_virtual_unwind+0x38(csw=0000000000A8F938, ip=0x422da3, context=0000000000A8F5F4, cfa=0000000000A8F1F0) [/wine/dlls/dbghelp/dwarf.c:3859] in d
bghelp (0x00000000a8f1cc)
  25 0x000000795f3f3a fetch_next_frame32+0x2a(csw=<register ESI not accessible in this frame>, pcontext=<register EBX not accessible in this frame>, curr_pc=<register EDI not accessible in this frame>) [/wine/dlls/dbghelp/cpu_i386.c:102] in dbghelp (0x00000000a8f228)
  26 0x000000795f425f i386_stack_walk+0x1bf(csw=<couldn't compute location>, frame=<couldn't compute location>, context=<couldn't compute location>) [/wine/dlls/dbghelp/c
pu_i386.c:475] in dbghelp (0x00000000a8f8d0)
  27 0x0000007962e1eb StackWalkEx+0x10b(MachineType=<couldn't compute location>, hProcess=<couldn't compute location>, hThread=<couldn't compute location>, frame=<couldn't compute location>, ctx=<couldn't compute location>, f_read_m
em=<couldn't compute location>, FunctionTableAccessRoutine=<couldn't compute location>, GetModuleBaseRoutine=<couldn't compute location>, f_xlat_adr=<couldn't compute location>, flags=<couldn't compute location>) [/wine/dlls/dbghelp/stack.c:329] in dbghelp (0x00000000a8f968)
  28 0x00000000423131 std::backtrace::Backtrace::trace+0x329() in test (0x00000000a8fe04)
  29 0x00000000423131 std::backtrace::Backtrace::trace_unsynchronized<std::backtrace::{impl#4}::create::{closure_env#0}>+0x329() in test (0x00000000a8fe04)
  30 0x00000000423131 std::backtrace::Backtrace::create+0x381() in test (0x00000000a8fe04)
  31 0x00000000422da3 std::backtrace::Backtrace::force_capture+0x13() in test (0x00000000a8fe10)
  32 0x00000000402191 in test (+0x2191) (0x00000000a8fe34)
  33 0x00000000401759 in test (+0x1759) (0x00000000a8fe40)
  34 0x000000004015df in test (+0x15df) (0x00000000a8fe4c)
  35 0x00000000401653 in test (+0x1653) (0x00000000a8fe5c)
  36 0x000000004214de std::rt::call_once<(), (dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)>+0x5() in test (0x00000000a8febc)
  37 0x000000004214de std::rt::do_call<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32>+0x5() in test (0x00000000a8febc)
  38 0x000000004214de std::rt::try<i32, &(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)>+0x5() in test (0x00000000a8febc)
  39 0x000000004214de std::rt::catch_unwind<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32>+0x5() in test (0x00000000a8febc)
  40 0x000000004214de std::rt::{closure#2}+0x5() in test (0x00000000a8febc)
  41 0x000000004214de std::rt::do_call<std::rt::lang_start_internal::{closure_env#2}, isize>+0x8() in test (0x00000000a8febc)
  42 0x000000004214de std::rt::try<isize, std::rt::lang_start_internal::{closure_env#2}>+0x8() in test (0x00000000a8febc)
  43 0x000000004214de std::rt::catch_unwind<std::rt::lang_start_internal::{closure_env#2}, isize>+0x8() in test (0x00000000a8febc)
  44 0x000000004214de std::rt::lang_start_internal+0x8e() in test (0x00000000a8febc)
  45 0x00000000401628 in test (+0x1628) (0x00000000a8fee4)
  46 0x000000004021ee in test (+0x21ee) (0x00000000a8ff08)
  47 0x000000004012f0 in test (+0x12f0) (0x00000000a8ff48)
  48 0x0000007bba8b00 in kernel32 (+0x28b00) (0x00000000a8ff68)
  49 0x0000007bd544f3 in ntdll (+0x544f3) (0x00000000a8ff80)
  50 0x0000007bd559f5 in ntdll (+0x559f5) (0x00000000a8ffec)
0x000000795fd180 dwarf2_fill_attr+0x790 [/wine/dlls/dbghelp/dwarf.c:683] in dbghelp: mov (%edi), %edi
683             TRACE("ref_alt<0x%Ix>\n", attr->u.uvalue);
Wine-dbg>quit
wine: Unhandled page fault on read access to 726F735F at address 795FD180 (thread 0158), starting debugger...

Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:795fd180 ESP:00a8c194 EBP:00a8c1c4 EFLAGS:00010246(  R- --  I  Z- -P- )
 EAX:00000003 EBX:01440554 ECX:726f735f EDX:00000004
 ESI:00a8c228 EDI:726f735f
Stack dump:
0x00000000a8c194:  7962eb7b 000096b9 00a8c228 01440554
0x00000000a8c1a4:  01440594 00a8c1c4 795fe22c 01440594
0x00000000a8c1b4:  0009180d 016d09c8 00000001 00a8c228
0x00000000a8c1c4:  00a8c200 795fe37a 00a8c228 0247e5c8
0x00000000a8c1d4:  00001003 00000006 00000001 0000000d
0x00000000a8c1e4:  025e2e84 00000000 00a8c228 00000000
Backtrace:
=>0 0x000000795fd180 dwarf2_get_addr+0x5cc(word_size=<internal error>, ptr=<internal error>) [/wine/dlls/dbghelp/dwarf.c:373] in dbghelp (0x00000000a8c1c4)
  1 0x000000795fd180 dwarf2_fill_attr+0x790(ctx=<register EBX not accessible in this frame>, data=<register ECX not accessible in this frame>, attr=0000000000A8C228, abbrev_attr=<internal error>) [/wine/dlls/dbghelp/dwarf.c:683] in dbghelp (0x00000000a8c1c4)
  2 0x000000795fe37a dwarf2_find_attribute+0xfa(di=<is not available>, at=<internal error>, attr=0000000000A8C228) [/wine/dlls/dbghelp/dwarf.c:757] in dbghelp (0x00000000
a8c200)
  3 0x00000079600ae0 dwarf2_parse_inlined_subroutine+0x50(subpgm=<register ESI not accessible in this frame>, di=<register EBX not accessible in this frame>) [/wine/dlls/
dbghelp/dwarf.c:2134] in dbghelp (0x00000000a8c250)
  4 0x00000079600d7f dwarf2_parse_inlined_subroutine+0x2ef(subpgm=<register ESI not accessible in this frame>, di=<register EBX not accessible in this frame>) [/wine/dlls
/dbghelp/dwarf.c:2174] in dbghelp (0x00000000a8c2a0)
  5 0x000000796010fc dwarf2_parse_subprogram+0x33c(di=<register EBX not accessible in this frame>) [./wine/dlls/dbghelp/dwarf.c:2396] in dbghelp (0x00000000a8c348)
  6 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c3d0)
  7 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c3d0)
  8 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c458)
  9 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c458)
  10 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c4e0)
  11 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c4e0)
  12 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c568)
  13 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c568)
  14 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c5f0)
  15 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c5f0)
  16 0x00000079601b8e dwarf2_parse_namespace+0x5e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2491] in dbghelp (0x00000000a8c678)
  17 0x00000079601b8e dwarf2_load_one_entry+0x32e(di=<internal error>) [/wine/dlls/dbghelp/dwarf.c:2527] in dbghelp (0x00000000a8c678)
  18 0x000000795fd7b6 dwarf2_parse_compilation_unit+0x246(ctx=0000000001440554) [/wine/dlls/dbghelp/dwarf.c:2977] in dbghelp (0x00000000a8c790)
  19 0x00000079602798 dwarf2_load_CU_module+0x518(module_ctx=0000000000A8C854, module=<internal error>, sections=<internal error>, load_offset=0, thunks=0000000000000000, is_dwz=0) [/wine
-32-build/../wine/dlls/dbghelp/dwarf.c:4134] in dbghelp (0x00000000a8c7f4)
  20 0x00000079603854 dwarf2_parse+0x9b4(module=000000000105CD68, load_offset=0, thunks=0000000000000000, fmap=0000000001021F80) [/wine/dlls/dbghelp/dwarf.c:4262] in dbgh
elp (0x00000000a8c8e0)
  21 0x00000079625ed4 pe_load_dwarf+0x33(module=<internal error>) [/wine/dlls/dbghelp/pe_module.c:533] in dbghelp (0x00000000a8c96c)
  22 0x00000079625ed4 pe_load_debug_info+0x394(pcs=0000000000355628, module=<is not available>) [/wine/dlls/dbghelp/pe_module.c:513] in dbghelp (0x00000000a8c96c)
  23 0x000000796120a7 module_load_debug+0x117(module=000000000105CD68) [/wine/dlls/dbghelp/module.c:392] in dbghelp (0x00000000a8cbbc)
  24 0x00000079602a28 dwarf2_virtual_unwind+0x38(csw=0000000000A8F938, ip=0x422da3, context=0000000000A8F5F4, cfa=0000000000A8F1F0) [/wine/dlls/dbghelp/dwarf.c:3859] in d
bghelp (0x00000000a8f1cc)
  25 0x000000795f3f3a fetch_next_frame32+0x2a(csw=<register ESI not accessible in this frame>, pcontext=<register EBX not accessible in this frame>, curr_pc=<register EDI not accessible in this frame>) [/wine/dlls/dbghelp/cpu_i386.c:102] in dbghelp (0x00000000a8f228)
  26 0x000000795f425f i386_stack_walk+0x1bf(csw=<couldn't compute location>, frame=<couldn't compute location>, context=<couldn't compute location>) [/wine/dlls/dbghelp/c
pu_i386.c:475] in dbghelp (0x00000000a8f8d0)
  27 0x0000007962e1eb StackWalkEx+0x10b(MachineType=<couldn't compute location>, hProcess=<couldn't compute location>, hThread=<couldn't compute location>, frame=<couldn't compute location>, ctx=<couldn't compute location>, f_read_m
em=<couldn't compute location>, FunctionTableAccessRoutine=<couldn't compute location>, GetModuleBaseRoutine=<couldn't compute location>, f_xlat_adr=<couldn't compute location>, flags=<couldn't compute location>) [/wine/dlls/dbghelp/stack.c:329] in dbghelp (0x00000000a8f968)
  28 0x00000000423131 std::backtrace::Backtrace::trace+0x329() in test (0x00000000a8fe04)
  29 0x00000000423131 std::backtrace::Backtrace::trace_unsynchronized<std::backtrace::{impl#4}::create::{closure_env#0}>+0x329() in test (0x00000000a8fe04)
  30 0x00000000423131 std::backtrace::Backtrace::create+0x381() in test (0x00000000a8fe04)
  31 0x00000000422da3 std::backtrace::Backtrace::force_capture+0x13() in test (0x00000000a8fe10)
  32 0x00000000402191 in test (+0x2191) (0x00000000a8fe34)
  33 0x00000000401759 in test (+0x1759) (0x00000000a8fe40)
  34 0x000000004015df in test (+0x15df) (0x00000000a8fe4c)
  35 0x00000000401653 in test (+0x1653) (0x00000000a8fe5c)
  36 0x000000004214de std::rt::call_once<(), (dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)>+0x5() in test (0x00000000a8febc)
  37 0x000000004214de std::rt::do_call<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32>+0x5() in test (0x00000000a8febc)
  38 0x000000004214de std::rt::try<i32, &(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)>+0x5() in test (0x00000000a8febc)
  39 0x000000004214de std::rt::catch_unwind<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32>+0x5() in test (0x00000000a8febc)
  40 0x000000004214de std::rt::{closure#2}+0x5() in test (0x00000000a8febc)
  41 0x000000004214de std::rt::do_call<std::rt::lang_start_internal::{closure_env#2}, isize>+0x8() in test (0x00000000a8febc)
  42 0x000000004214de std::rt::try<isize, std::rt::lang_start_internal::{closure_env#2}>+0x8() in test (0x00000000a8febc)
  43 0x000000004214de std::rt::catch_unwind<std::rt::lang_start_internal::{closure_env#2}, isize>+0x8() in test (0x00000000a8febc)
  44 0x000000004214de std::rt::lang_start_internal+0x8e() in test (0x00000000a8febc)
  45 0x00000000401628 in test (+0x1628) (0x00000000a8fee4)
  46 0x000000004021ee in test (+0x21ee) (0x00000000a8ff08)
  47 0x000000004012f0 in test (+0x12f0) (0x00000000a8ff48)
  48 0x0000007bba8b00 in kernel32 (+0x28b00) (0x00000000a8ff68)
  49 0x0000007bd544f3 in ntdll (+0x544f3) (0x00000000a8ff80)
  50 0x0000007bd559f5 in ntdll (+0x559f5) (0x00000000a8ffec)
0x000000795fd180 dwarf2_fill_attr+0x790 [/wine/dlls/dbghelp/dwarf.c:683] in dbghelp: mov (%edi), %edi
683             TRACE("ref_alt<0x%Ix>\n", attr->u.uvalue);
Wine-dbg>quit
wine: Unhandled page fault on read access to 726F735F at address 795FD180 (thread 0158), starting debugger...

I will do another one with wine-devel 9.3.

@Bytekeeper
Copy link
Author

> wine --version
wine-9.3
> wine test.exe
Unhandled exception: page fault on read access to 0x726f735f in wow64 32-bit code (0x7aaed180).
winedbg: Internal crash at 7AAED180

I omitted the backtrace, its basically the same.

@workingjubilee
Copy link
Member

Aha, thanks for the followup info! We think we have a fix for this en route.

@workingjubilee workingjubilee linked a pull request Mar 10, 2024 that will close this issue
Hagb added a commit to Hagb/giuroll that referenced this issue Jun 26, 2024
This commit is to avoid crash under wine when capturing full backtrace
with `std::backtrace::Backtrace::force_capture`.
(rust-lang/rust#122154)
Hagb added a commit to Hagb/giuroll that referenced this issue Oct 2, 2024
This commit is to avoid crash under wine when capturing full backtrace
with `std::backtrace::Backtrace::force_capture`.
(rust-lang/rust#122154)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. O-windows Operating system: Windows O-windows-gnu Toolchain: GNU, Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) (IA-32) T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
4 participants