Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Conversation

@mspang
Copy link
Contributor

@mspang mspang commented Jan 7, 2020

Use file offsets in traces if object has no symbols

Fallback to using file offsets if no symbol is found, like we do if the
object could not be opened.

This makes backtraces usable even if objects in the trace are stripped,
since the trace can be symbolized by post-processing it with a tool like
asan_symbolize.py.

Note that this is not currently compatible with SymbolizeCallback as
this overwrites the filename in the buffer. The behavior is unchanged
in that case.

Closes: #514

@shinh
Copy link
Contributor

shinh commented Jan 8, 2020

Seems reasonable! Is there any reason someone want to turn off this feature? I'm not sure if we need SYMBOLIZE_FALLBACK.

@mspang
Copy link
Contributor Author

mspang commented Jan 8, 2020

Seems reasonable! Is there any reason someone want to turn off this feature? I'm not sure if we need SYMBOLIZE_FALLBACK.

I agree it's probably unnecessary; removed. Only added that in case someone is depending on the return value for something as we're unlikely to ever return "false" after this change. Personally I think
that is a feature :)

Fallback to using file offsets if no symbol is found, like we do if the
object could not be opened.

This makes backtraces usable even if objects in the trace are stripped,
since the trace can be symbolized by post-processing it with a tool like
asan_symbolize.py.

Note that this is not currently compatible with SymbolizeCallback as
this overwrites the filename in the buffer. The behavior is unchanged
in that case.

Closes: #514
@ukai ukai added the LGTM label Jan 8, 2020
@ukai ukai merged commit 130a3e1 into google:master Jan 8, 2020
@mspang mspang deleted the symbolize-stripped-binaries branch January 11, 2020 19:52
@sergiud sergiud added this to the 0.5 milestone Mar 30, 2021
@sergiud sergiud mentioned this pull request May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stripped binaries produce useless backtraces

5 participants