-
Notifications
You must be signed in to change notification settings - Fork 176
fix: Dereferencing freed memos when verifying provisional memos #788
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
Merged
MichaReiser
merged 2 commits into
salsa-rs:master
from
MichaReiser:fix-dereference-freed-memos
Apr 9, 2025
Merged
fix: Dereferencing freed memos when verifying provisional memos #788
MichaReiser
merged 2 commits into
salsa-rs:master
from
MichaReiser:fix-dereference-freed-memos
Apr 9, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #788 will not alter performanceComparing Summary
|
5536c7c
to
8b820db
Compare
MichaReiser
commented
Apr 9, 2025
560b74f
to
149f615
Compare
carljm
approved these changes
Apr 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
149f615
to
7e8c8e0
Compare
7e8c8e0
to
d33d824
Compare
Merged
This was referenced Apr 9, 2025
carljm
pushed a commit
to astral-sh/ruff
that referenced
this pull request
Apr 9, 2025
## Summary Update Salsa to pull in salsa-rs/salsa#788 which fixes the, by now, famous *access to field whilst the value is being initialized*. This PR also re-enables all tests that previously triggered the panic. ## Test Plan `cargo test`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #785
The root cause of #785 is that Salsa tries to load the memo of a cycle head that is stored on a tracked struct that has been freed.
The main problem is that we tried to verify
validate_provisional
even in cases where the query is from a past revision, in which case we can't trust any inputs to still exist (and be valid).The fix in this PR is to change the order in which
shallow_verify
andvalidate_provisional
are called. This requires extracting the mutating bits out ofshallow_verify
because we only want to call those if the struct isn't provisional (at least, that's what we did before and I tried to preserve this behavior).