From d8c0768788f218f0443dd2d6e83f6a4531f336d4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 5 Sep 2018 06:26:40 +0300 Subject: [PATCH] Use _Exit(3) instead of abort() to avoid core dump --- include/boost/core/lightweight_test.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/core/lightweight_test.hpp b/include/boost/core/lightweight_test.hpp index b71d86c..0994561 100644 --- a/include/boost/core/lightweight_test.hpp +++ b/include/boost/core/lightweight_test.hpp @@ -55,7 +55,14 @@ public: ~test_result() { if (!report_) { BOOST_LIGHTWEIGHT_TEST_OSTREAM << "main() should return report_errors()" << std::endl; + +#if defined(_MSC_VER) + ::_exit( 3 ); +#elif 1 + ::_Exit( 3 ); +#else std::abort(); +#endif } }