runtime: vmoffsets must be checked in reverse order (#4253)
When adding shared memory, memories owned by the module were added to a `owned_memories` array placed immediately after the `defined_memories` array. When checking the size of each array with `region_sizes`, the size of `defined_memories` and `owned_memories` were checked in this order. But `region_sizes` is iterating through the fields in the reverse order. This change reverses the field order to fix the associated fuzz bug.
This commit is contained in:
@@ -251,8 +251,8 @@ impl<P: PtrSize> VMOffsets<P> {
|
||||
calculate_sizes! {
|
||||
defined_anyfuncs: "module functions",
|
||||
defined_globals: "defined globals",
|
||||
defined_memories: "defined memories",
|
||||
owned_memories: "owned memories",
|
||||
defined_memories: "defined memories",
|
||||
defined_tables: "defined tables",
|
||||
imported_globals: "imported globals",
|
||||
imported_memories: "imported memories",
|
||||
|
||||
Reference in New Issue
Block a user