From 8a31caa72fe284bf9643f6ccec68dc36ea4ac210 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 26 Dec 2018 18:39:38 -0800 Subject: [PATCH] Protect stack overflow with SetInterruptFunction (sigaltstack under the hood) --- src/main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cc b/src/main.cc index 95cd0363..8ff56712 100644 --- a/src/main.cc +++ b/src/main.cc @@ -143,6 +143,7 @@ int main(int argc, char **argv) { sys::ChangeStdinToBinary(); sys::ChangeStdoutToBinary(); + sys::SetInterruptFunction(nullptr); if (opt_index.size()) { SmallString<256> Root(opt_index); sys::fs::make_absolute(Root);