Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/abi/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,9 @@ func allocStoreList(mem []byte, list []Value, elemType bintype.TypeDesc, resolve
if err != nil {
return 0, 0, fmt.Errorf("realloc failed: %w", err)
}
if newPtr%elemAlign != 0 {
return 0, 0, fmt.Errorf("realloc return: %s pointer %d not aligned to %d", elemType.Kind(), newPtr, elemAlign)
}

if _, _, err := checkedRange(len(mem), newPtr, byteLen); err != nil {
return 0, 0, fmt.Errorf("allocated memory out of bounds: ptr=%d size=%d", newPtr, byteLen)
Expand Down
1 change: 0 additions & 1 deletion testdata/conformance/xfail.json
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@
"values__post-return__0015__L215/action/L216": "required canonical ABI trap is not enforced",
"values__post-return__0029__L229/action/L230": "required canonical ABI trap is not enforced",
"values__post-return__0043__L243/action/L244": "required canonical ABI trap is not enforced",
"values__realloc__0006__L93/action/L94": "required canonical ABI trap is not enforced",
"values__transcode__0000__L7/action/L113": "canonical transcoding semantics are incomplete",
"values__transcode__0002__L117/action/L201": "217: call: component/instance: export \"run\": call core func \"run\": component/instance: host import \"join\" \"\": component/instance: export \"join\": call core func \"join\": wasm trap...",
"values__transcode__0004__L205/action/L319": "canonical transcoding semantics are incomplete",
Expand Down
Loading