From 3d791d29b879c21cbbc31a60e35d16a877eb56dc Mon Sep 17 00:00:00 2001 From: kennytm Date: Thu, 16 Nov 2017 01:01:18 +0800 Subject: [PATCH] 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 1d2bfd001f1..de2d8f8e0ba 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 }