Skip to content

Commit a5a799e

Browse files
Forestrykspoechsel
authored andcommitted
Change error message when receiving SIGBUS (#8)
1 parent 7327ca4 commit a5a799e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Support/Unix/Signals.inc

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "llvm/Support/Program.h"
4646
#include "llvm/Support/SaveAndRestore.h"
4747
#include "llvm/Support/raw_ostream.h"
48+
#include "llvm/Support/PrettyStackTrace.h"
4849
#include <algorithm>
4950
#include <string>
5051
#ifdef HAVE_BACKTRACE
@@ -388,6 +389,12 @@ static void SignalHandler(int Sig) {
388389
OneShotPipeSignalFunction.exchange(nullptr))
389390
return OldOneShotPipeFunction();
390391

392+
if (Sig == SIGBUS) {
393+
llvm::setBugReportMsg("Linker received SIGBUG which most likely means that there "
394+
"is insufficient disk space available. If you think this is "
395+
"not the case, please reach out internally for assistance.\n");
396+
}
397+
391398
bool IsIntSig = llvm::is_contained(IntSigs, Sig);
392399
if (IsIntSig)
393400
if (auto OldInterruptFunction = InterruptFunction.exchange(nullptr))

0 commit comments

Comments
 (0)