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

read/cfi: replace Expression with offset/length #703

Merged
merged 5 commits into from
Mar 14, 2024

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Mar 12, 2024

This avoids the need to store Reader in the UnwindContext, which simplifies lifetime management.

Closes #701

This avoids the need to store `Reader` in the `UnwindContext`,
which simplifies lifetime management.
@philipc
Copy link
Collaborator Author

philipc commented Mar 12, 2024

Maybe adding a type for the offset/length pair will make this easier to convert to.

@mstange
Copy link
Contributor

mstange commented Mar 12, 2024

I like this solution a lot more than what I proposed!

@philipc
Copy link
Collaborator Author

philipc commented Mar 13, 2024

I've added the UnwindExpression type. Can you check if this meets your needs? I tried it in unwinding and it was a simple change, but framehop looks more involved.

mstange added a commit to mstange/framehop that referenced this pull request Mar 14, 2024
@mstange
Copy link
Contributor

mstange commented Mar 14, 2024

Can you check if this meets your needs?

It meets my needs perfectly, thanks so much!

I have the framehop changes on a branch here: https://github.com/mstange/framehop/commits/gimli-issue-701/

I tried it in unwinding and it was a simple change, but framehop looks more involved.

I agree, it was quite a bit more involved than I expected (because I had forgotten a lot about what framehop was doing, and because of how framehop is exposing the UnwindContextStorage / EvaluationStorage to the outside world).

mstange added a commit to mstange/framehop that referenced this pull request Mar 14, 2024
@philipc philipc marked this pull request as ready for review March 14, 2024 06:32
@philipc philipc merged commit d8361e8 into gimli-rs:master Mar 14, 2024
20 checks passed
@philipc philipc deleted the issue-701 branch March 14, 2024 06:57
@mstange
Copy link
Contributor

mstange commented Apr 5, 2024

I'd be interested in a release with this fix.

@philipc
Copy link
Collaborator Author

philipc commented Apr 5, 2024

I'll do an object release then do a small amount of work on better relocation support here before I do a release.

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.

UnwindContext allocation cannot be reused across multiple unwinds with changing data lifetimes
2 participants