diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2020-10-26 15:46:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 15:46:16 -0700 |
commit | 8e42376ccd5f05dc1036f91b4262e67b0fc66c2d (patch) | |
tree | 8d20862bff763460a5632d9a705ffb0f77a8d4cd /src/interp/interp-inl.h | |
parent | 30af7afe3c27fd2957036eb09453f74ecc75ac67 (diff) | |
download | wabt-8e42376ccd5f05dc1036f91b4262e67b0fc66c2d.tar.gz wabt-8e42376ccd5f05dc1036f91b4262e67b0fc66c2d.tar.bz2 wabt-8e42376ccd5f05dc1036f91b4262e67b0fc66c2d.zip |
Changes required to make the new Memory64 spec tests run (#1560)
These uncovered some things the previous tests didn't!
Also required the switching of the location of the index as discussed in https://github.com/WebAssembly/memory64/issues/5
Also one small .py change that ensures the new tests have consistent posix paths.
Diffstat (limited to 'src/interp/interp-inl.h')
-rw-r--r-- | src/interp/interp-inl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interp/interp-inl.h b/src/interp/interp-inl.h index 9cab1fa9..f10efaab 100644 --- a/src/interp/interp-inl.h +++ b/src/interp/interp-inl.h @@ -633,7 +633,11 @@ inline Memory::Ptr Memory::New(interp::Store& store, MemoryType type) { } inline bool Memory::IsValidAccess(u64 offset, u64 addend, u64 size) const { - return offset + addend + size <= data_.size(); + // FIXME: make this faster. + return offset <= data_.size() && + addend <= data_.size() && + size <= data_.size() && + offset + addend + size <= data_.size(); } inline bool Memory::IsValidAtomicAccess(u64 offset, |