aboutsummaryrefslogtreecommitdiff
path: root/src/lib/err/backtrace.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-08-30 21:17:07 +1000
committerteor <teor@torproject.org>2019-08-30 21:51:07 +1000
commit65a1d86491d56c77048d01e0b4fc6b933a13795c (patch)
tree1f810ae50081db7e6bbf0aeffeb84a8c6e837714 /src/lib/err/backtrace.c
parent743bc0028be46e92a46b3b5e38f1e50ee69ff284 (diff)
downloadtor-65a1d86491d56c77048d01e0b4fc6b933a13795c.tar.gz
tor-65a1d86491d56c77048d01e0b4fc6b933a13795c.zip
torerr: Log the Tor backtrace version when a raw assertion fails
Part of 31571.
Diffstat (limited to 'src/lib/err/backtrace.c')
-rw-r--r--src/lib/err/backtrace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/err/backtrace.c b/src/lib/err/backtrace.c
index c34eb6dfa6..a4d8269c6a 100644
--- a/src/lib/err/backtrace.c
+++ b/src/lib/err/backtrace.c
@@ -261,6 +261,14 @@ dump_stack_symbols_to_error_fds(void)
}
#endif /* defined(NO_BACKTRACE_IMPL) */
+/** Return the tor version used for error messages on crashes.
+ * Signal-safe: returns a pointer to a static array. */
+const char *
+get_tor_backtrace_version(void)
+{
+ return bt_version;
+}
+
/** Set up code to handle generating error messages on crashes. */
int
configure_backtrace_handler(const char *tor_version)