Commit 837dc0b
authored
Validate full offset for shared memories (#2472)
This commit fixes a bug in wasmparser where the full offset in a memarg
was not validated when the memarg was used with an atomic instruction.
This is an internal bug that wasn't caught during the implementation of
the memory64 proposal which is necessary to faithfully validate the
input module. The fix here is to delegate to the normal `check_memarg`
helper which ensures that all the normal rules apply in addition to the
extra rule for atomics.1 parent 8f21770 commit 837dc0b
3 files changed
Lines changed: 18 additions & 1 deletion
File tree
- crates/wasmparser/src/validator
- tests
- cli
- snapshots/cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
1165 | | - | |
| 1165 | + | |
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
0 commit comments