Skip to content

Commit 3dbb0fb

Browse files
authored
Change error message when receiving SIGBUS (#8)
1 parent 57b330f commit 3dbb0fb

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
@@ -387,6 +388,12 @@ static void SignalHandler(int Sig) {
387388
OneShotPipeSignalFunction.exchange(nullptr))
388389
return OldOneShotPipeFunction();
389390

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

0 commit comments

Comments
 (0)