-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Miri engine cleanup #53671
Merged
Merged
Miri engine cleanup #53671
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c141ccf
Miri Memory Work
RalfJung 2592b20
without all those copies of constants, we can finally make eval_opera…
RalfJung 286fc5c
allow Machine to hook into foreign statics; remove unused HasMemory t…
RalfJung 66d64ba
simplify const_to_allocation_provider because it is used for statics …
RalfJung aa645f3
Clean up function calling
RalfJung a5baea6
terminator/drop.rs is just one fn... merge it together with the other…
RalfJung 035c69f
switch validation to use operand, not mplace
RalfJung ef96a60
move const_eval out of rustc_mir::interpret
RalfJung 9cfc9f0
get rid of FinishStatic hack from stack clenaup; const_eval can do th…
RalfJung 548b373
dedicated handling for binops on bool and char (UB if they are not va…
RalfJung 89cfd08
validate enum discriminant whenever it is read
RalfJung c898e19
fix handling of unsized types in validation; validate str to be UTF-8
RalfJung 07bdd48
expand comment on how statics work
RalfJung c38cc89
fix len() on non-array but array-layout types (e.g. SIMD)
RalfJung 5b737db
get rid of *most* of the fn call hack by honoring mir.spread_arg
RalfJung 6c78fa8
use associated const for machine controlling mutable statics
RalfJung f96208c
address nits
RalfJung 066d2ee
fix unsized extern types
RalfJung e6a5a94
restructure unary_op to also dispatch on type first; fix promotion wi…
RalfJung 506dd70
fix const_prop detecting unary neg underflows
RalfJung c9b5fac
first test const-ness, then hook fn call
RalfJung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Why is this made mutable?
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.
This is how all allocations are created. Previously, mutability was entirely ignored by the miri engine, so this flag only mattered once the static got interned (where it gets set, in
intern_static
inmemory.rs
).But now that the engine enforces mutability, we have to make some allocations mutable or else we have no heap ;)