From 35f6746c60a40eeb3c3356e6a8652f72792a1c30 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Sun, 15 Oct 2017 13:21:40 +0100 Subject: [PATCH] Workaround `regressions/smt2/error.smt2` test timing out. When ASan's LeakSanitizer is enabled leak checking is triggered when `exit()` is called and it returns so many false positives that it takes a long time to write them to the console. To workaround this we simply call `_Exit()` instead. --- src/parsers/smt2/smt2parser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parsers/smt2/smt2parser.cpp b/src/parsers/smt2/smt2parser.cpp index b8ad7e610..b43ee9f6e 100644 --- a/src/parsers/smt2/smt2parser.cpp +++ b/src/parsers/smt2/smt2parser.cpp @@ -444,7 +444,10 @@ namespace smt2 { m_ctx.regular_stream()<< "line " << line << " column " << pos << ": " << escaped(msg, true) << "\")" << std::endl; } if (m_ctx.exit_on_error()) { - exit(1); + // WORKAROUND: ASan's LeakSanitizer reports many false positives when + // calling `exit()` so call `_Exit()` instead which avoids invoking leak + // checking. + _Exit(1); } }