From 2a65b2f3875f72d6596143e04ac5602c6f44711d Mon Sep 17 00:00:00 2001 From: Andres Noetzli Date: Mon, 12 Jul 2021 10:31:58 -0700 Subject: [PATCH] Use default visibility for `cvc5::Exception` (#6856) Currently, `cvc5::Exception` does not have default visibility, which can cause cvc5 to terminate when trying to catch it in `main.cpp`. Presumably, this is because the necessary typeinfo is missing [0]. Due to this issue, production builds for M1 on macOS crashed when parser exceptions were thrown. The commit changes the visibility of the exception. [0] https://gcc.gnu.org/wiki/Visibility, "Problems with C++ exceptions (please read!)" --- src/base/exception.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/exception.h b/src/base/exception.h index 6b692abd9..0f053e415 100644 --- a/src/base/exception.h +++ b/src/base/exception.h @@ -26,7 +26,7 @@ namespace cvc5 { -class Exception : public std::exception +class CVC5_EXPORT Exception : public std::exception { protected: std::string d_msg; -- 2.30.2