Skip to content

Commit 09c5253

Browse files
committed
Update smoke test frame offset condition
1 parent bafd664 commit 09c5253

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/smoke.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ fn smoke_test_frames() {
4242
// On 32-bit windows apparently the first frame isn't our backtrace
4343
// frame but it's actually this frame. I'm not entirely sure why, but at
4444
// least it seems consistent?
45-
let o = if cfg!(all(windows, target_pointer_width = "32")) {1} else {0};
45+
let is_win32 = cfg!(all(windows, target_pointer_width = "32"));
46+
let use_rtl_capture_backtrace = cfg!(feature = "kernel32");
47+
let o = if is_win32 && (MSVC || !use_rtl_capture_backtrace) {1} else {0};
48+
4649
// frame offset 0 is the `backtrace::trace` function, but that's generic
4750
assert_frame(&v, o, 1, frame_4 as usize, "frame_4",
4851
"tests/smoke.rs", start_line + 6);

0 commit comments

Comments
 (0)