Ask Your Question
0

The stacktrace appears to be incomplete when using clang address sanitizer.

asked 2023-05-15 11:00:51 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-15 11:21:01 +0000

djk gravatar image

This can happen because the address sanitizer only reports stack frames that it has instrumented. If a stack frame is not instrumented, it will not appear in the stack trace.

To get a more complete stack trace, you can try increasing the stack trace depth by setting the ASAN_OPTIONS environment variable:

export ASAN_OPTIONS="stack_trace_format='{{FUNCTION_OFFSET}} {{FUNCTION_NAME}} ({{SOURCEFILE}}:{{LINENO}})' stack_trace_max_depth=10000"

This will print out the function offset, name, source file, and line number for each stack frame, and will go up to a maximum depth of 10000 frames.

If this does not provide a complete stack trace, it is possible that the missing frames are not related to the issue being reported by the address sanitizer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-15 11:00:51 +0000

Seen: 20 times

Last updated: May 15 '23