Skip to content

Commit 53a5d56

Browse files
petrochenkovYamakaky
authored andcommitted
Fix tests on ARM Linux (#3)
1 parent 0982a28 commit 53a5d56

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/libstd/sys/unix/backtrace/tracing/gcc_s.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ pub fn unwind_backtrace(frames: &mut [Frame])
5353
// See libunwind:src/unwind/Backtrace.c for the return values.
5454
// No, there is no doc.
5555
match result_unwind {
56-
uw::_URC_END_OF_STACK | uw::_URC_FATAL_PHASE1_ERROR => {
56+
// These return codes seem to be benign and need to be ignored for backtraces
57+
// to show up properly on all tested platforms.
58+
uw::_URC_END_OF_STACK | uw::_URC_FATAL_PHASE1_ERROR | uw::_URC_FAILURE => {
5759
Ok((cx.idx, BacktraceContext))
5860
}
5961
_ => {

src/libstd/sys_common/backtrace.rs

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ fn filter_frames(frames: &[Frame],
134134
"__libc_start_main",
135135
"__rust_try",
136136
"_start",
137+
"main",
137138
"BaseThreadInitThunk",
138139
"__scrt_common_main_seh",
139140
"_ZN4drop",

0 commit comments

Comments
 (0)