Skip to content

Commit 4712d49

Browse files
authored
Document that an out-of-bounds pointer shall trap (#536)
discussion: #505
1 parent 868fa15 commit 4712d49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

legacy/tools/witx-docs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ For example, the `poll_oneoff` function has these arguments:
7777
Pointer values are expected to be aligned, to the alignment of their pointee
7878
type. If a misaligned pointer is passed to a function, the function shall trap.
7979

80+
If an out-of-bounds pointer is passed to a function and the function needs
81+
to dereference it, the function shall trap rather than returning
82+
`errno.fault`.
83+
8084
[module linking proposal]: https://github.com/WebAssembly/module-linking/
8185
[interface types]: https://github.com/WebAssembly/interface-types/blob/main/proposals/interface-types/Explainer.md
8286
[wat format]: https://webassembly.github.io/spec/core/bikeshed/index.html#text-format%E2%91%A0

0 commit comments

Comments
 (0)