| 65 | } |
| 66 | |
| 67 | void captureBacktrace(size_t skip, vector<InstructionPointer>& stackTrace) { |
| 68 | // Beware of a bug on some platforms, which makes the trace loop until the |
| 69 | // buffer is full when it reaches a noexcept function. It seems to be fixed in |
| 70 | // newer versions of gcc. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56846 |
| 71 | // TODO(t10738439): Investigate workaround for the stack trace bug |
| 72 | BacktraceState state = {skip, stackTrace}; |
| 73 | _Unwind_Backtrace(unwindCallback, &state); |
| 74 | } |
| 75 | |
| 76 | // this is a pointer to a function |
| 77 | std::atomic<LibraryIdentifierFunctionType> gLibraryIdentifierFunction{nullptr}; |