From cd57b761ce0670920fcdbe3a3e79b1bb4807d11e Mon Sep 17 00:00:00 2001 From: kennytm Date: Thu, 16 Nov 2017 00:54:39 +0800 Subject: [PATCH 1/2] Travis/macOS: Improve crash log collection accuracy. --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62336a7ff2ad5..5ff3a1c13f0d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -254,11 +254,11 @@ after_failure: # Random attempt at debugging currently. Just poking around in here to see if # anything shows up. - ls -lat $HOME/Library/Logs/DiagnosticReports/ - - find $HOME/Library/Logs/DiagnosticReports/ ! \( - -name '*.stage2-*.crash' - -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' - \) - -exec echo -e travis_fold":start:crashlog\n\033[31;1m" {} "\033[0m" \; + - find $HOME/Library/Logs/DiagnosticReports + -type f + -not -name '*.stage2-*.crash' + -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' + -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; From 3d791d29b879c21cbbc31a60e35d16a877eb56dc Mon Sep 17 00:00:00 2001 From: kennytm Date: Thu, 16 Nov 2017 01:01:18 +0800 Subject: [PATCH 2/2] In additional to segfault, retry the linker on bus error as well. --- src/librustc_trans/back/link.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 1d2bfd001f1fe..de2d8f8e0ba7b 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -644,9 +644,9 @@ fn link_natively(sess: &Session, let mut out = output.stderr.clone(); out.extend(&output.stdout); let out = String::from_utf8_lossy(&out); - let msg = "clang: error: unable to execute command: \ - Segmentation fault: 11"; - if !out.contains(msg) { + let msg_segv = "clang: error: unable to execute command: Segmentation fault: 11"; + let msg_bus = "clang: error: unable to execute command: Bus error: 10"; + if !(out.contains(msg_segv) || out.contains(msg_bus)) { break }