mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 04:50:31 -04:00
fix(util): folly::exceptionStr() segfaults for exception_ptr on arm32
This commit is contained in:
parent
0e6e32720b
commit
84eb0de383
13
src/util.cpp
13
src/util.cpp
@ -407,7 +407,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