From 64fd3596054c5efc4f77cbc0c6dd98e89449781c Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 27 Jul 2025 23:43:36 +0200 Subject: [PATCH] fix(util): folly::exceptionStr() segfaults for exception_ptr on arm32 --- src/util.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/util.cpp b/src/util.cpp index 71140c10..3a350b78 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -394,7 +394,20 @@ std::string exception_str(std::exception const& e) { } std::string exception_str(std::exception_ptr const& e) { +#if defined(__linux__) && defined(__arm__) + try { + if (e) { + std::rethrow_exception(e); + } + } catch (std::exception const& ex) { + return folly::exceptionStr(ex).toStdString(); + } catch (...) { + return "unknown exception"; + } + return "no exception"; +#else return folly::exceptionStr(e).toStdString(); +#endif } unsigned int hardware_concurrency() noexcept {