Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad backtraces because codeloc compression does not roundtrip properly #54031

Closed
Keno opened this issue Apr 10, 2024 · 2 comments · Fixed by #54032
Closed

Bad backtraces because codeloc compression does not roundtrip properly #54031

Keno opened this issue Apr 10, 2024 · 2 comments · Fixed by #54032

Comments

@Keno
Copy link
Member

Keno commented Apr 10, 2024

I've been noticing completely garbage backtraces in longer functions. I've looked into this a bit, and I believe the root cause is that codelocs don't roundtrip properly through the compression. E.g. here is the linetable from one of my larger functions, which comes out garbage from decompression: https://gist.github.com/Keno/0a5a9d90427f8352c5f9bf1ce394a998

Keno added a commit that referenced this issue Apr 11, 2024
I'm not entirely sure what the original intent of this statement
was, but the effect ends up being that some codeloc entries end
up negative in the compressed representation, but the code always
assumes unsigned integers, so things roundtripped badly, leading
to badly corrupted stack traces. Fixes #54031.
@IanButterworth
Copy link
Sponsor Member

I wonder if this is the issue behind #53816 and that the libunwind warning is a red herring

@Keno
Copy link
Member Author

Keno commented Apr 11, 2024

Try the PR and see if the issue is fixed.

Keno added a commit that referenced this issue Apr 11, 2024
I'm not entirely sure what the original intent of this statement was,
but the effect ends up being that some codeloc entries end up negative
in the compressed representation, but the code always assumes unsigned
integers, so things roundtripped badly, leading to badly corrupted stack
traces. I guess this might have been a rebase mistake,
since the same line exists (correctly) a few lines prior. Fixes #54031.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants