mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2026-05-21 21:59:37 -05:00
Get rid of backtrace machinery
It is currently very fragile, due to:
* Differing versions of compilers/DWARF version result in a variety
of breakages in the our code which analyzes the DWARF info;
* With musl, libunwind seems to be currently unable to traverse
beyond signal handlers, due to the DWARF information not
being present in the signal frame.
See <https://maskray.me/blog/2022-04-10-unwinding-through-signal-handler>.
Note that I have not verified that the problem in the blog
post above is indeed what we're hitting, but it seems plausible.
This commit is contained in:
@@ -4,12 +4,9 @@
|
||||
#include <atomic>
|
||||
#include <fcntl.h>
|
||||
#include <cxxabi.h>
|
||||
#define UNW_LOCAL_ONLY
|
||||
#include <libunwind.h>
|
||||
|
||||
#include "Common.hpp"
|
||||
#include "BinaryFormatter.hpp"
|
||||
#include "Backtrace.hpp"
|
||||
#include "Exception.hpp"
|
||||
|
||||
const char *translateErrno(int _errno) {
|
||||
@@ -181,15 +178,6 @@ std::string removeTemplates(const std::string & s) {
|
||||
|
||||
}
|
||||
|
||||
AbstractException::AbstractException() {
|
||||
generateBacktrace(_stacktrace, sizeof(_stacktrace));
|
||||
}
|
||||
|
||||
|
||||
const char * AbstractException::getStackTrace() const {
|
||||
return _stacktrace;
|
||||
}
|
||||
|
||||
const char *EggsException::what() const throw() {
|
||||
return _msg.c_str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user