diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-07-12 10:31:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 17:31:58 +0000 |
commit | 2a65b2f3875f72d6596143e04ac5602c6f44711d (patch) | |
tree | 65fe42309de6b86dd4d15a3715047c277ddaaefe | |
parent | b71bf740b517c3a530d92c33bd24769330708d76 (diff) |
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!)"
-rw-r--r-- | src/base/exception.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; |