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

Fix Op::ImplicitPointer::size() to match Op::ImplicitPointer::write() #712

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

crzysdrs
Copy link
Contributor

@crzysdrs crzysdrs commented Apr 25, 2024

The size function did not mirror the corresponding size adjustment based on dwarf version 2 found in write causing an assertion to fail due to a mismatch between the expected location and the actual write location.

thread '<unnamed>' panicked at /home/crzysdrs/proj/gimli/src/write/unit.rs:620:9:
assertion `left == right` failed
  left: DebugInfoOffset(1324)
 right: DebugInfoOffset(1328)

This looks like an oversight on my part when contributing #618.

Copy link
Collaborator

@philipc philipc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change test_operation to include version 2? I think it would have found this bug.

@crzysdrs crzysdrs requested a review from philipc April 25, 2024 18:50
Copy link
Collaborator

@philipc philipc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@philipc philipc merged commit c49f64d into gimli-rs:master Apr 25, 2024
20 checks passed
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 this pull request may close these issues.

2 participants