From: Andres Noetzli Date: Mon, 12 Jul 2021 17:31:58 +0000 (-0700) Subject: Use default visibility for `cvc5::Exception` (#6856) X-Git-Tag: cvc5-1.0.0~1506 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a65b2f3875f72d6596143e04ac5602c6f44711d;p=cvc5.git 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!)" --- 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;