mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
backtrace: avoid undefined behaviour on re-initialisation
cb_buf_mutex is statically initialised, so we can not destroy it when we are shutting down the err subsystem. If we destroy it, and then re-initialise tor, all our backtraces will fail. Part of 31736, but committed in this branch to avoid merge conflicts.
This commit is contained in:
parent
ab7bfdf404
commit
315f14c709
@ -251,6 +251,10 @@ remove_bt_handler(void)
|
|||||||
* It's not a fatal error, so we just ignore it. */
|
* It's not a fatal error, so we just ignore it. */
|
||||||
(void)sigaction(trap_signals[i], &sa, NULL);
|
(void)sigaction(trap_signals[i], &sa, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* cb_buf_mutex is statically initialised, so we can not destroy it.
|
||||||
|
* If we destroy it, and then re-initialise tor, all our backtraces will
|
||||||
|
* fail. */
|
||||||
}
|
}
|
||||||
#endif /* defined(USE_BACKTRACE) */
|
#endif /* defined(USE_BACKTRACE) */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user