Skip to content

Commit 85bcfae

Browse files
committed
Debug
1 parent 4e6b3f0 commit 85bcfae

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

bin_tests/tests/crashtracker_bin_test.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ fn test_crash_tracking_bin_prechain_sigabrt() {
129129
test_crash_tracking_bin(BuildProfile::Release, "prechain_abort", "null_deref");
130130
}
131131

132+
// This test is disabled for now on x86_64 musl.
133+
// It seems that on aarch64 musl, libc has CFI which allows
134+
// unwinding passed the signal frame.
132135
#[test]
136+
#[cfg(not(all(target_arch = "x86_64", target_env = "musl")))]
133137
#[cfg_attr(miri, ignore)]
134138
fn test_crasht_tracking_validate_callstack() {
135139
test_crash_tracking_callstack()
@@ -190,14 +194,18 @@ fn test_crash_tracking_callstack() {
190194

191195
// Note: in Release, we do not have the crate and module name prepended to the function name
192196
// Here we compile the crashing app in Debug.
193-
let expected_functions: Vec<&str> = [
194-
"crashing_test_app::unix::fn3",
197+
let mut expected_functions = vec![
195198
"crashing_test_app::unix::fn2",
196199
"crashing_test_app::unix::fn1",
197200
"crashing_test_app::unix::main",
198201
"crashing_test_app::main",
199-
]
200-
.to_vec();
202+
];
203+
// It seems that on arm/arm64, fn3 is inlined in fn2, so not present.
204+
// Add fn3 only for x86_64 arch
205+
#[cfg(target_arch = "x86_64")]
206+
{
207+
expected_functions.insert(0, "crashing_test_app::unix::fn3");
208+
}
201209

202210
let crashing_callstack = &crash_payload["error"]["stack"]["frames"];
203211
assert!(

0 commit comments

Comments
 (0)