diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc index 05a7335216f43..bdb989eb994a1 100644 --- a/llvm/lib/Support/Unix/Signals.inc +++ b/llvm/lib/Support/Unix/Signals.inc @@ -45,6 +45,7 @@ #include "llvm/Support/Program.h" #include "llvm/Support/SaveAndRestore.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/PrettyStackTrace.h" #include #include #ifdef HAVE_BACKTRACE @@ -387,6 +388,12 @@ static void SignalHandler(int Sig) { OneShotPipeSignalFunction.exchange(nullptr)) return OldOneShotPipeFunction(); + if (Sig == SIGBUS) { + llvm::setBugReportMsg("Linker received SIGBUG which most likely means that there " + "is insufficient disk space available. If you think this is " + "not the case, please reach out internally for assistance.\n"); + } + bool IsIntSig = llvm::is_contained(IntSigs, Sig); if (IsIntSig) if (auto OldInterruptFunction = InterruptFunction.exchange(nullptr))