mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-03 09:47:01 -04:00
fix(util): folly::exceptionStr() segfaults for exception_ptr on arm32
This commit is contained in:
parent
5027c12f78
commit
64fd359605
13
src/util.cpp
13
src/util.cpp
@ -394,7 +394,20 @@ std::string exception_str(std::exception const& e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string exception_str(std::exception_ptr 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();
|
return folly::exceptionStr(e).toStdString();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int hardware_concurrency() noexcept {
|
unsigned int hardware_concurrency() noexcept {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user