Skip to content

Why doesn't abseil Stacktrace print line numbers? #1688

Answered by derekmauro
MBkkt asked this question in Q&A
Discussion options

You must be logged in to vote

The primary use of Abseil's stacktrace functionality is to give a stacktrace in a signal handler when a program crashes. This means that the implementation needs to be async-signal-safe, which limits what we can do easily. Maybe it is possible to get line numbers in an async-signal-safe way, but no one has done it yet.

Another consequence of async-signal-safety is that Abseil's stacktrace, at least on Linux, is slower than some of the alternatives. That doesn't make it a good general stacktrace method.

We have another implementation that gets us line numbers, but that isn't async-signal-safe. I would like to include it as part of Abseil, but we have are hands busy in other things today.

C…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MBkkt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants