[multibyte] Expand array load and store validation#8929
Merged
brendandahl merged 1 commit intoJul 23, 2026
Conversation
Expand array load and store validation to all numeric, vector, and packed element types (i8, i16, i32, i64, f32, f64, v128), as well as offset and alignment immediates. Multibyte array operations apply to numeric and vector array backing types. This permits loads from mutable and immutable arrays while enforcing mutability on stores, rejecting non-numeric arrays, and validating offset and alignment immediates.
Collaborator
Author
|
Updates to the interpreter will be in a following PR. |
kripken
approved these changes
Jul 23, 2026
Member
|
Looks like this is breaking the fuzzer: (module
(type $0 (func))
(type $1 (array (mut i64)))
(export "expanded_types_invoker" (func $0))
(func $0 (type $0)
(drop
(i64.load (type $1)
(array.new_default $1
(i32.const 32)
)
(i32.const 0)
)
)
(unreachable)
)
)This used to not validate, but now it does, and it errors when we try to run it, The fuzzer ignores things that don't validate (it assumes it is running with the wrong features), but runtime errors during execution are reported as bugs. |
Collaborator
Author
|
Forgot the fuzzer would potentially generate these instructions already. |
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
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.
Expand array load and store validation to all numeric, vector, and packed element types (i8, i16, i32, i64, f32, f64, v128), as well as offset and alignment immediates.
Multibyte array operations apply to numeric and vector array backing types. This permits loads from mutable and immutable arrays while enforcing mutability on stores, rejecting non-numeric arrays, and validating offset and alignment immediates.