Commit 0666e8d5 authored by Chad Austin's avatar Chad Austin Committed by Facebook GitHub Bot

fix exception_tracer build on macOS

Summary:
exception_tracer is currently gated on FOLLY_USE_SYMBOLIZER, and when
I enabled it, I didn't notice the CMake build of Folly on macOS
stopped working.

Fix it by adding correct conditionals, and removing the removed
std::unexpected_handler.

Reviewed By: yfeldblum, lnicco

Differential Revision: D23690777

fbshipit-source-id: 76ada7911ac33de3b1e8b0a73cebf3c2d04a58ef
parent cd60da45
......@@ -30,7 +30,8 @@ namespace __cxxabiv1 {
struct __cxa_exception {
std::type_info* exceptionType;
void (*exceptionDestructor)(void*);
std::unexpected_handler unexpectedHandler;
void (*unexpectedHandler)(); // std::unexpected_handler has been removed from
// C++17.
std::terminate_handler terminateHandler;
__cxa_exception* nextException;
......
......@@ -66,6 +66,7 @@ void printExceptionInfo(
}
out << " (" << info.frames.size()
<< (info.frames.size() == 1 ? " frame" : " frames") << ")\n";
#if FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF
try {
size_t frameCount = info.frames.size();
......@@ -92,6 +93,7 @@ void printExceptionInfo(
} catch (...) {
out << "\n !!! caught unexpected exception\n";
}
#endif
}
namespace {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment