Skip to content

Commit

Permalink
Document that an out-of-bounds pointer shall trap
Browse files Browse the repository at this point in the history
discussion: WebAssembly#505
  • Loading branch information
yamt committed May 10, 2023
1 parent 33de9e5 commit dcc2287
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions legacy/tools/witx-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ For example, the `poll_oneoff` function has these arguments:
Pointer values are expected to be aligned, to the alignment of their pointee
type. If a misaligned pointer is passed to a function, the function shall trap.

If an out-of-bounds pointer is passed to a function and the function needs
to dereference it, the function shall trap rather than returning
`errno.fault`.

[module linking proposal]: https://github.com/WebAssembly/module-linking/
[interface types]: https://github.com/WebAssembly/interface-types/blob/main/proposals/interface-types/Explainer.md
[wat format]: https://webassembly.github.io/spec/core/bikeshed/index.html#text-format%E2%91%A0
Expand Down

0 comments on commit dcc2287

Please sign in to comment.