diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-15 18:50:55 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-15 18:50:55 +0100 |
| commit | b1034b86023672e6750da49b01a7d429cd8339d0 (patch) | |
| tree | 6147dac325b2bb062bfb35e0aa09d81f7e5758fe /private_include | |
| parent | 0b2a1fd9439d5ab1cdc076d7b9f1e763c4900b74 (diff) | |
Check memory linear accesses are within bounds
WebAssembly defines how many pages of linear memory are owned by the
instance on startup. This limit can then be bumped via the grow_memory
operator.
Therefore, accesses outside the defined bounds are considered an
exception.
Diffstat (limited to 'private_include')
| -rw-r--r-- | private_include/nw/linear.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/private_include/nw/linear.h b/private_include/nw/linear.h index a316e77..cdd7eb0 100644 --- a/private_include/nw/linear.h +++ b/private_include/nw/linear.h @@ -17,5 +17,6 @@ enum nw_state nwp_linear_load(struct nw_interp *i, struct nw_sm_io *io, unsigned long offset); enum nw_state nwp_linear_store(struct nw_interp *i, struct nw_sm_io *io, unsigned long offset); +int nwp_linear_check(const struct nw_interp *i, unsigned long offset, size_t n); #endif |
