Skip to content

threads: check mutability of GC instructions#1729

Merged
alexcrichton merged 5 commits intobytecodealliance:mainfrom
abrown:set-mutability
Aug 21, 2024
Merged

threads: check mutability of GC instructions#1729
alexcrichton merged 5 commits intobytecodealliance:mainfrom
abrown:set-mutability

Conversation

@abrown
Copy link
Copy Markdown
Member

@abrown abrown commented Aug 20, 2024

This adds logic and tests to check that struct|array.atomic.rmw.* instructions cannot modify GC objects unless they're marked as mutable.

abrown added 2 commits August 20, 2024 13:39
Previously this was not being checked; this adds tests which force new
validation logic.
Copy link
Copy Markdown
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks! Could these checks perhaps be encapsulated in helpers? Something like self.mutable_struct_field_at(...) instead of self.struct_field_at(...) plus a check?

Comment thread crates/wasmparser/src/validator/operators.rs Outdated
@alexcrichton alexcrichton added this pull request to the merge queue Aug 21, 2024
Merged via the queue into bytecodealliance:main with commit 3a451e0 Aug 21, 2024
@abrown abrown deleted the set-mutability branch August 21, 2024 17:37
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