Skip to content

Commit 1f491e0

Browse files
committed
Auto merge of #46009 - kennytm:fix-38878-again, r=alexcrichton
Fix #38878 again — restart linker when seeing SIGBUS in additional to SIGSEGV. In #45985 (comment) we see a linker crashed due to Bus Error (signal 10) on macOS. The error was not caught by #40422 since the PR only handles Segmentation Fault (signal 11). The crash log indicates the problem is the same as #38878, so we just amend #40422 to include SIGBUS as well. (Additionally, modified how the crash logs are printed so that irrelevant logs are truly filtered out.)
2 parents 18250b0 + 3d791d2 commit 1f491e0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ after_failure:
254254
# Random attempt at debugging currently. Just poking around in here to see if
255255
# anything shows up.
256256
- ls -lat $HOME/Library/Logs/DiagnosticReports/
257-
- find $HOME/Library/Logs/DiagnosticReports/ ! \(
258-
-name '*.stage2-*.crash'
259-
-name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
260-
\)
261-
-exec echo -e travis_fold":start:crashlog\n\033[31;1m" {} "\033[0m" \;
257+
- find $HOME/Library/Logs/DiagnosticReports
258+
-type f
259+
-not -name '*.stage2-*.crash'
260+
-not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
261+
-exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
262262
-exec head -750 {} \;
263263
-exec echo travis_fold":"end:crashlog \;
264264

src/librustc_trans/back/link.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,9 @@ fn link_natively(sess: &Session,
661661
let mut out = output.stderr.clone();
662662
out.extend(&output.stdout);
663663
let out = String::from_utf8_lossy(&out);
664-
let msg = "clang: error: unable to execute command: \
665-
Segmentation fault: 11";
666-
if !out.contains(msg) {
664+
let msg_segv = "clang: error: unable to execute command: Segmentation fault: 11";
665+
let msg_bus = "clang: error: unable to execute command: Bus error: 10";
666+
if !(out.contains(msg_segv) || out.contains(msg_bus)) {
667667
break
668668
}
669669

0 commit comments

Comments
 (0)