summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2020-10-26 15:46:16 -0700
committerGitHub <noreply@github.com>2020-10-26 15:46:16 -0700
commit8e42376ccd5f05dc1036f91b4262e67b0fc66c2d (patch)
tree8d20862bff763460a5632d9a705ffb0f77a8d4cd
parent30af7afe3c27fd2957036eb09453f74ecc75ac67 (diff)
downloadwabt-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.
-rw-r--r--src/interp/interp-inl.h6
-rw-r--r--src/interp/interp.cc38
-rw-r--r--src/interp/interp.h1
-rw-r--r--src/wast-parser.cc65
-rw-r--r--src/wast-parser.h1
-rw-r--r--src/wat-writer.cc6
-rw-r--r--test/dump/bulk-memory64.txt2
-rw-r--r--test/dump/load64.txt2
-rw-r--r--test/dump/store64.txt2
-rw-r--r--test/interp/load64.txt2
-rw-r--r--test/interp/store64.txt2
-rw-r--r--test/parse/expr/atomic64.txt2
-rw-r--r--test/parse/expr/bulk-memory-named64.txt2
-rw-r--r--test/parse/expr/grow-memory64.txt2
-rw-r--r--test/parse/expr/load64.txt2
-rw-r--r--test/parse/expr/memory-copy64.txt2
-rw-r--r--test/parse/expr/memory-fill64.txt2
-rw-r--r--test/parse/expr/memory-init64.txt2
-rw-r--r--test/parse/expr/store64.txt2
-rw-r--r--test/roundtrip/bulk-memory64.txt4
-rw-r--r--test/roundtrip/fold-load-store64.txt4
-rw-r--r--test/roundtrip/memory-index64.txt4
-rw-r--r--test/spec/memory64/address64.txt42
-rw-r--r--test/spec/memory64/align64.txt302
-rw-r--r--test/spec/memory64/bulk64.txt33
-rw-r--r--test/spec/memory64/endianness64.txt6
-rw-r--r--test/spec/memory64/float_memory64.txt30
-rw-r--r--test/spec/memory64/load64.txt196
-rw-r--r--test/spec/memory64/memory64.txt39
-rw-r--r--test/spec/memory64/memory_grow64.txt12
-rw-r--r--test/spec/memory64/memory_redundancy64.txt9
-rw-r--r--test/spec/memory64/memory_trap64.txt172
-rwxr-xr-xtest/update-spec-tests.py1
33 files changed, 932 insertions, 65 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,
diff --git a/src/interp/interp.cc b/src/interp/interp.cc
index 5262edbe..2f5120d2 100644
--- a/src/interp/interp.cc
+++ b/src/interp/interp.cc
@@ -1023,6 +1023,10 @@ Value Thread::Pop() {
return value;
}
+u64 Thread::PopPtr(const Memory::Ptr& memory) {
+ return memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+}
+
template <typename T>
void WABT_VECTORCALL Thread::Push(T value) {
Push(Value::Make(value));
@@ -1187,15 +1191,15 @@ RunResult Thread::StepInternal(Trap::Ptr* out_trap) {
case O::MemoryGrow: {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32]};
u64 old_size = memory->PageSize();
- if (Failed(memory->Grow(Pop<u32>()))) {
- if (memory->type().limits.is_64) {
+ if (memory->type().limits.is_64) {
+ if (Failed(memory->Grow(Pop<u64>()))) {
Push<s64>(-1);
} else {
- Push<s32>(-1);
+ Push<u64>(old_size);
}
} else {
- if (memory->type().limits.is_64) {
- Push<u64>(old_size);
+ if (Failed(memory->Grow(Pop<u32>()))) {
+ Push<s32>(-1);
} else {
Push<u32>(old_size);
}
@@ -1754,7 +1758,7 @@ RunResult Thread::DoCall(const Func::Ptr& func, Trap::Ptr* out_trap) {
template <typename T>
RunResult Thread::Load(Instr instr, T* out, Trap::Ptr* out_trap) {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]};
- u64 offset = memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+ u64 offset = PopPtr(memory);
TRAP_IF(Failed(memory->Load(offset, instr.imm_u32x2.snd, out)),
StringPrintf("out of bounds memory access: access at %" PRIu64
"+%" PRIzd " >= max value %" PRIu64,
@@ -1777,7 +1781,7 @@ template <typename T, typename V>
RunResult Thread::DoStore(Instr instr, Trap::Ptr* out_trap) {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]};
V val = static_cast<V>(Pop<T>());
- u64 offset = memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+ u64 offset = PopPtr(memory);
TRAP_IF(Failed(memory->Store(offset, instr.imm_u32x2.snd, val)),
StringPrintf("out of bounds memory access: access at %" PRIu64
"+%" PRIzd " >= max value %" PRIu64,
@@ -1843,7 +1847,7 @@ RunResult Thread::DoMemoryInit(Instr instr, Trap::Ptr* out_trap) {
auto&& data = inst_->datas()[instr.imm_u32x2.snd];
auto size = Pop<u32>();
auto src = Pop<u32>();
- auto dst = Pop<u32>();
+ auto dst = PopPtr(memory);
TRAP_IF(Failed(memory->Init(dst, data, src, size)),
"out of bounds memory access: memory.init out of bounds");
return RunResult::Ok;
@@ -1857,9 +1861,9 @@ RunResult Thread::DoDataDrop(Instr instr) {
RunResult Thread::DoMemoryCopy(Instr instr, Trap::Ptr* out_trap) {
Memory::Ptr mem_dst{store_, inst_->memories()[instr.imm_u32x2.fst]};
Memory::Ptr mem_src{store_, inst_->memories()[instr.imm_u32x2.snd]};
- auto size = Pop<u32>();
- auto src = Pop<u32>();
- auto dst = Pop<u32>();
+ auto size = PopPtr(mem_src);
+ auto src = PopPtr(mem_src);
+ auto dst = PopPtr(mem_dst);
// TODO: change to "out of bounds"
TRAP_IF(Failed(Memory::Copy(*mem_dst, dst, *mem_src, src, size)),
"out of bounds memory access: memory.copy out of bound");
@@ -1868,9 +1872,9 @@ RunResult Thread::DoMemoryCopy(Instr instr, Trap::Ptr* out_trap) {
RunResult Thread::DoMemoryFill(Instr instr, Trap::Ptr* out_trap) {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32]};
- auto size = Pop<u32>();
+ auto size = PopPtr(memory);
auto value = Pop<u32>();
- auto dst = Pop<u32>();
+ auto dst = PopPtr(memory);
TRAP_IF(Failed(memory->Fill(dst, value, size)),
"out of bounds memory access: memory.fill out of bounds");
return RunResult::Ok;
@@ -2151,7 +2155,7 @@ RunResult Thread::DoSimdLoadExtend(Instr instr, Trap::Ptr* out_trap) {
template <typename T, typename V>
RunResult Thread::DoAtomicLoad(Instr instr, Trap::Ptr* out_trap) {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]};
- u64 offset = memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+ u64 offset = PopPtr(memory);
V val;
TRAP_IF(Failed(memory->AtomicLoad(offset, instr.imm_u32x2.snd, &val)),
StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset,
@@ -2164,7 +2168,7 @@ template <typename T, typename V>
RunResult Thread::DoAtomicStore(Instr instr, Trap::Ptr* out_trap) {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]};
V val = static_cast<V>(Pop<T>());
- u64 offset = memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+ u64 offset = PopPtr(memory);
TRAP_IF(Failed(memory->AtomicStore(offset, instr.imm_u32x2.snd, val)),
StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset,
instr.imm_u32x2.snd));
@@ -2177,7 +2181,7 @@ RunResult Thread::DoAtomicRmw(BinopFunc<T, T> f,
Trap::Ptr* out_trap) {
Memory::Ptr memory{store_, inst_->memories()[instr.imm_u32x2.fst]};
T val = static_cast<T>(Pop<R>());
- u64 offset = memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+ u64 offset = PopPtr(memory);
T old;
TRAP_IF(Failed(memory->AtomicRmw(offset, instr.imm_u32x2.snd, val, f, &old)),
StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset,
@@ -2192,7 +2196,7 @@ RunResult Thread::DoAtomicRmwCmpxchg(Instr instr, Trap::Ptr* out_trap) {
V replace = static_cast<V>(Pop<T>());
V expect = static_cast<V>(Pop<T>());
V old;
- u64 offset = memory->type().limits.is_64 ? Pop<u64>() : Pop<u32>();
+ u64 offset = PopPtr(memory);
TRAP_IF(Failed(memory->AtomicRmwCmpxchg(offset, instr.imm_u32x2.snd, expect,
replace, &old)),
StringPrintf("invalid atomic access at %" PRIaddress "+%u", offset,
diff --git a/src/interp/interp.h b/src/interp/interp.h
index 32f6a73e..b4de72e4 100644
--- a/src/interp/interp.h
+++ b/src/interp/interp.h
@@ -1065,6 +1065,7 @@ class Thread : public Object {
template <typename T>
T WABT_VECTORCALL Pop();
Value Pop();
+ u64 PopPtr(const Memory::Ptr& memory);
template <typename T>
void WABT_VECTORCALL Push(T);
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index 79085262..872c61c2 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -939,6 +939,22 @@ bool WastParser::ParseAlignOpt(Address* out_align) {
}
}
+Result WastParser::ParseLimitsIndex(Limits* out_limits) {
+ WABT_TRACE(ParseLimitsIndex);
+
+ if (PeekMatch(TokenType::ValueType)) {
+ if (GetToken().type() == Type::I64) {
+ Consume();
+ out_limits->is_64 = true;
+ } else if (GetToken().type() == Type::I32) {
+ Consume();
+ out_limits->is_64 = false;
+ }
+ }
+
+ return Result::Ok;
+}
+
Result WastParser::ParseLimits(Limits* out_limits) {
WABT_TRACE(ParseLimits);
@@ -954,11 +970,6 @@ Result WastParser::ParseLimits(Limits* out_limits) {
out_limits->is_shared = true;
}
- if (PeekMatch(TokenType::ValueType) && GetToken().type() == Type::I64) {
- Consume();
- out_limits->is_64 = true;
- }
-
return Result::Ok;
}
@@ -1387,6 +1398,7 @@ Result WastParser::ParseImportModuleField(Module* module) {
Consume();
ParseBindVarOpt(&name);
auto import = MakeUnique<MemoryImport>(name);
+ CHECK_RESULT(ParseLimitsIndex(&import->memory.page_limits));
CHECK_RESULT(ParseLimits(&import->memory.page_limits));
EXPECT(Rpar);
field = MakeUnique<ImportModuleField>(std::move(import), loc);
@@ -1441,32 +1453,35 @@ Result WastParser::ParseMemoryModuleField(Module* module) {
CheckImportOrdering(module);
auto import = MakeUnique<MemoryImport>(name);
CHECK_RESULT(ParseInlineImport(import.get()));
+ CHECK_RESULT(ParseLimitsIndex(&import->memory.page_limits));
CHECK_RESULT(ParseLimits(&import->memory.page_limits));
auto field =
MakeUnique<ImportModuleField>(std::move(import), GetLocation());
module->AppendField(std::move(field));
- } else if (MatchLpar(TokenType::Data)) {
- auto data_segment_field = MakeUnique<DataSegmentModuleField>(loc);
- DataSegment& data_segment = data_segment_field->data_segment;
- data_segment.memory_var = Var(module->memories.size());
- data_segment.offset.push_back(MakeUnique<ConstExpr>(Const::I32(0)));
- data_segment.offset.back().loc = loc;
- ParseTextListOpt(&data_segment.data);
- EXPECT(Rpar);
-
- auto memory_field = MakeUnique<MemoryModuleField>(loc, name);
- uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE(data_segment.data.size());
- uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
- memory_field->memory.page_limits.initial = page_size;
- memory_field->memory.page_limits.max = page_size;
- memory_field->memory.page_limits.has_max = true;
-
- module->AppendField(std::move(memory_field));
- module->AppendField(std::move(data_segment_field));
} else {
auto field = MakeUnique<MemoryModuleField>(loc, name);
- CHECK_RESULT(ParseLimits(&field->memory.page_limits));
- module->AppendField(std::move(field));
+ CHECK_RESULT(ParseLimitsIndex(&field->memory.page_limits));
+ if (MatchLpar(TokenType::Data)) {
+ auto data_segment_field = MakeUnique<DataSegmentModuleField>(loc);
+ DataSegment& data_segment = data_segment_field->data_segment;
+ data_segment.memory_var = Var(module->memories.size());
+ data_segment.offset.push_back(MakeUnique<ConstExpr>(Const::I32(0)));
+ data_segment.offset.back().loc = loc;
+ ParseTextListOpt(&data_segment.data);
+ EXPECT(Rpar);
+
+ uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE(data_segment.data.size());
+ uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
+ field->memory.page_limits.initial = page_size;
+ field->memory.page_limits.max = page_size;
+ field->memory.page_limits.has_max = true;
+
+ module->AppendField(std::move(field));
+ module->AppendField(std::move(data_segment_field));
+ } else {
+ CHECK_RESULT(ParseLimits(&field->memory.page_limits));
+ module->AppendField(std::move(field));
+ }
}
AppendInlineExportFields(module, &export_fields, module->memories.size() - 1);
diff --git a/src/wast-parser.h b/src/wast-parser.h
index 57c0264f..b25709de 100644
--- a/src/wast-parser.h
+++ b/src/wast-parser.h
@@ -137,6 +137,7 @@ class WastParser {
Result ParseQuotedText(std::string* text);
bool ParseOffsetOpt(Address* offset);
bool ParseAlignOpt(Address* align);
+ Result ParseLimitsIndex(Limits*);
Result ParseLimits(Limits*);
Result ParseNat(uint64_t*);
diff --git a/src/wat-writer.cc b/src/wat-writer.cc
index aa781f31..5e08af96 100644
--- a/src/wat-writer.cc
+++ b/src/wat-writer.cc
@@ -1267,6 +1267,9 @@ void WatWriter::WriteEvent(const Event& event) {
}
void WatWriter::WriteLimits(const Limits& limits) {
+ if (limits.is_64) {
+ Writef("i64");
+ }
Writef("%" PRIu64, limits.initial);
if (limits.has_max) {
Writef("%" PRIu64, limits.max);
@@ -1274,9 +1277,6 @@ void WatWriter::WriteLimits(const Limits& limits) {
if (limits.is_shared) {
Writef("shared");
}
- if (limits.is_64) {
- Writef("i64");
- }
}
void WatWriter::WriteTable(const Table& table) {
diff --git a/test/dump/bulk-memory64.txt b/test/dump/bulk-memory64.txt
index b473faf7..a3833294 100644
--- a/test/dump/bulk-memory64.txt
+++ b/test/dump/bulk-memory64.txt
@@ -2,7 +2,7 @@
;;; ARGS0: --enable-bulk-memory
(module
- (memory 1 i64)
+ (memory i64 1)
(data "a")
(func
i64.const 0 i32.const 0 i32.const 0 memory.init 0
diff --git a/test/dump/load64.txt b/test/dump/load64.txt
index 508c1cb7..8b6f239e 100644
--- a/test/dump/load64.txt
+++ b/test/dump/load64.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v
(module
- (memory 1 i64)
+ (memory i64 1)
(func
i64.const 0
i32.load
diff --git a/test/dump/store64.txt b/test/dump/store64.txt
index f48447a8..ce98f9d9 100644
--- a/test/dump/store64.txt
+++ b/test/dump/store64.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v
(module
- (memory 1 i64)
+ (memory i64 1)
(func
i64.const 0
i32.const 0
diff --git a/test/interp/load64.txt b/test/interp/load64.txt
index 95b42572..387edb81 100644
--- a/test/interp/load64.txt
+++ b/test/interp/load64.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-interp
;;; ARGS: --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(data (i32.const 0) "\ff\ff\ff\ff")
(data (i32.const 4) "\00\00\ce\41")
(data (i32.const 8) "\00\00\00\00\00\ff\8f\40")
diff --git a/test/interp/store64.txt b/test/interp/store64.txt
index dec6a7f9..d53484ee 100644
--- a/test/interp/store64.txt
+++ b/test/interp/store64.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-interp
;;; ARGS: --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(func (export "i32_store8") (result i32)
i64.const 0
diff --git a/test/parse/expr/atomic64.txt b/test/parse/expr/atomic64.txt
index fb911e55..d907c13b 100644
--- a/test/parse/expr/atomic64.txt
+++ b/test/parse/expr/atomic64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-threads --enable-memory64
(module
- (memory 1 1 shared i64)
+ (memory i64 1 1 shared)
(func
i64.const 0 i32.const 0 atomic.notify drop
i64.const 0 i32.const 0 i64.const 0 i32.atomic.wait drop
diff --git a/test/parse/expr/bulk-memory-named64.txt b/test/parse/expr/bulk-memory-named64.txt
index e90d41d8..842bbb12 100644
--- a/test/parse/expr/bulk-memory-named64.txt
+++ b/test/parse/expr/bulk-memory-named64.txt
@@ -2,7 +2,7 @@
;;; ARGS: --enable-bulk-memory --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(data $data "a")
(func
i64.const 0 i32.const 0 i32.const 0 memory.init $data
diff --git a/test/parse/expr/grow-memory64.txt b/test/parse/expr/grow-memory64.txt
index 86157173..17531b8d 100644
--- a/test/parse/expr/grow-memory64.txt
+++ b/test/parse/expr/grow-memory64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(func
i64.const 100
grow_memory
diff --git a/test/parse/expr/load64.txt b/test/parse/expr/load64.txt
index 528f8dbe..2ff7493b 100644
--- a/test/parse/expr/load64.txt
+++ b/test/parse/expr/load64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(func
i64.const 0
i32.load
diff --git a/test/parse/expr/memory-copy64.txt b/test/parse/expr/memory-copy64.txt
index aa942e99..108f1260 100644
--- a/test/parse/expr/memory-copy64.txt
+++ b/test/parse/expr/memory-copy64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-bulk-memory --enable-memory64
(module
- (memory 0 i64)
+ (memory i64 0)
(func
i64.const 0
diff --git a/test/parse/expr/memory-fill64.txt b/test/parse/expr/memory-fill64.txt
index fb7eaf37..0e87bf09 100644
--- a/test/parse/expr/memory-fill64.txt
+++ b/test/parse/expr/memory-fill64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-bulk-memory --enable-memory64
(module
- (memory 0 i64)
+ (memory i64 0)
(func
i64.const 0
diff --git a/test/parse/expr/memory-init64.txt b/test/parse/expr/memory-init64.txt
index 93fe469e..1316e91f 100644
--- a/test/parse/expr/memory-init64.txt
+++ b/test/parse/expr/memory-init64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-bulk-memory --enable-memory64
(module
- (memory 0 i64)
+ (memory i64 0)
(func
i64.const 0
diff --git a/test/parse/expr/store64.txt b/test/parse/expr/store64.txt
index f6370d13..05380608 100644
--- a/test/parse/expr/store64.txt
+++ b/test/parse/expr/store64.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(func
i64.const 0
i32.const 0
diff --git a/test/roundtrip/bulk-memory64.txt b/test/roundtrip/bulk-memory64.txt
index dcbf0ca4..716ec04d 100644
--- a/test/roundtrip/bulk-memory64.txt
+++ b/test/roundtrip/bulk-memory64.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --enable-bulk-memory --enable-memory64
(module
- (memory 0 i64)
+ (memory i64 0)
(table 0 anyfunc)
(func
@@ -71,7 +71,7 @@
table.copy)
(func (;1;) (type 0))
(table (;0;) 0 funcref)
- (memory (;0;) 0 i64)
+ (memory (;0;) i64 0)
(elem (;0;) funcref (ref.func 0) (ref.null func))
(elem (;1;) func 1)
(data (;0;) "hi"))
diff --git a/test/roundtrip/fold-load-store64.txt b/test/roundtrip/fold-load-store64.txt
index 67466b0f..91e45a60 100644
--- a/test/roundtrip/fold-load-store64.txt
+++ b/test/roundtrip/fold-load-store64.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --fold-exprs --enable-memory64
(module
- (memory 1 i64)
+ (memory i64 1)
(func $fold-load
i64.const 1
i32.load
@@ -55,5 +55,5 @@
(i64.const 1)
(memory.grow
(i64.const 2))))
- (memory (;0;) 1 i64))
+ (memory (;0;) i64 1))
;;; STDOUT ;;)
diff --git a/test/roundtrip/memory-index64.txt b/test/roundtrip/memory-index64.txt
index 6c94ccd8..e9e33da4 100644
--- a/test/roundtrip/memory-index64.txt
+++ b/test/roundtrip/memory-index64.txt
@@ -1,8 +1,8 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --enable-memory64
(module
- (import "a" "b" (memory 1 i64)))
+ (import "a" "b" (memory i64 1)))
(;; STDOUT ;;;
(module
- (import "a" "b" (memory (;0;) 1 i64)))
+ (import "a" "b" (memory (;0;) i64 1)))
;;; STDOUT ;;)
diff --git a/test/spec/memory64/address64.txt b/test/spec/memory64/address64.txt
new file mode 100644
index 00000000..177d2f25
--- /dev/null
+++ b/test/spec/memory64/address64.txt
@@ -0,0 +1,42 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/address64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+out/test/spec/memory64/address64.wast:192: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/address64.wast:194: assert_trap passed: out of bounds memory access: access at 4294967295+1 >= max value 65536
+out/test/spec/memory64/address64.wast:195: assert_trap passed: out of bounds memory access: access at 4294967295+1 >= max value 65536
+out/test/spec/memory64/address64.wast:196: assert_trap passed: out of bounds memory access: access at 4294967295+2 >= max value 65536
+out/test/spec/memory64/address64.wast:197: assert_trap passed: out of bounds memory access: access at 4294967295+2 >= max value 65536
+out/test/spec/memory64/address64.wast:198: assert_trap passed: out of bounds memory access: access at 4294967295+4 >= max value 65536
+out/test/spec/memory64/address64.wast:200: assert_trap passed: out of bounds memory access: access at 4294967296+1 >= max value 65536
+out/test/spec/memory64/address64.wast:201: assert_trap passed: out of bounds memory access: access at 4294967296+1 >= max value 65536
+out/test/spec/memory64/address64.wast:202: assert_trap passed: out of bounds memory access: access at 4294967296+2 >= max value 65536
+out/test/spec/memory64/address64.wast:203: assert_trap passed: out of bounds memory access: access at 4294967296+2 >= max value 65536
+out/test/spec/memory64/address64.wast:204: assert_trap passed: out of bounds memory access: access at 4294967296+4 >= max value 65536
+out/test/spec/memory64/address64.wast:207: assert_malformed passed:
+ out/test/spec/memory64/address64/address64.1.wat:1:37: error: offset must be less than or equal to 0xffffffff
+ (memory i64 1)(func (drop (i32.load offset=4294967296 (i64.const 0))))
+ ^^^^^^^^^^^^^^^^^
+out/test/spec/memory64/address64.wast:479: assert_trap passed: out of bounds memory access: access at 65529+8 >= max value 65536
+out/test/spec/memory64/address64.wast:481: assert_trap passed: out of bounds memory access: access at 4294967295+1 >= max value 65536
+out/test/spec/memory64/address64.wast:482: assert_trap passed: out of bounds memory access: access at 4294967295+1 >= max value 65536
+out/test/spec/memory64/address64.wast:483: assert_trap passed: out of bounds memory access: access at 4294967295+2 >= max value 65536
+out/test/spec/memory64/address64.wast:484: assert_trap passed: out of bounds memory access: access at 4294967295+2 >= max value 65536
+out/test/spec/memory64/address64.wast:485: assert_trap passed: out of bounds memory access: access at 4294967295+4 >= max value 65536
+out/test/spec/memory64/address64.wast:486: assert_trap passed: out of bounds memory access: access at 4294967295+4 >= max value 65536
+out/test/spec/memory64/address64.wast:487: assert_trap passed: out of bounds memory access: access at 4294967295+8 >= max value 65536
+out/test/spec/memory64/address64.wast:489: assert_trap passed: out of bounds memory access: access at 4294967296+1 >= max value 65536
+out/test/spec/memory64/address64.wast:490: assert_trap passed: out of bounds memory access: access at 4294967296+1 >= max value 65536
+out/test/spec/memory64/address64.wast:491: assert_trap passed: out of bounds memory access: access at 4294967296+2 >= max value 65536
+out/test/spec/memory64/address64.wast:492: assert_trap passed: out of bounds memory access: access at 4294967296+2 >= max value 65536
+out/test/spec/memory64/address64.wast:493: assert_trap passed: out of bounds memory access: access at 4294967295+4 >= max value 65536
+out/test/spec/memory64/address64.wast:494: assert_trap passed: out of bounds memory access: access at 4294967295+4 >= max value 65536
+out/test/spec/memory64/address64.wast:495: assert_trap passed: out of bounds memory access: access at 4294967296+8 >= max value 65536
+out/test/spec/memory64/address64.wast:539: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/address64.wast:541: assert_trap passed: out of bounds memory access: access at 4294967295+4 >= max value 65536
+out/test/spec/memory64/address64.wast:542: assert_trap passed: out of bounds memory access: access at 4294967296+4 >= max value 65536
+out/test/spec/memory64/address64.wast:586: assert_trap passed: out of bounds memory access: access at 65529+8 >= max value 65536
+out/test/spec/memory64/address64.wast:588: assert_trap passed: out of bounds memory access: access at 4294967295+8 >= max value 65536
+out/test/spec/memory64/address64.wast:589: assert_trap passed: out of bounds memory access: access at 4294967296+8 >= max value 65536
+239/239 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/align64.txt b/test/spec/memory64/align64.txt
new file mode 100644
index 00000000..59647e33
--- /dev/null
+++ b/test/spec/memory64/align64.txt
@@ -0,0 +1,302 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/align64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+out/test/spec/memory64/align64.wast:28: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.23.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load8_s align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:34: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.24.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load8_s align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:40: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.25.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load8_u align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:46: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.26.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load8_u align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:52: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.27.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load16_s align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:58: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.28.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load16_s align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:64: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.29.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load16_u align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:70: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.30.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load16_u align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:76: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.31.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:82: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.32.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i32.load align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:88: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.33.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load8_s align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:94: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.34.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load8_s align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:100: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.35.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load8_u align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:106: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.36.wat:1:49: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load8_u align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:112: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.37.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load16_s align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:118: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.38.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load16_s align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:124: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.39.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load16_u align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:130: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.40.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load16_u align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:136: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.41.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load32_s align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:142: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.42.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load32_s align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:148: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.43.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load32_u align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:154: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.44.wat:1:50: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load32_u align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:160: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.45.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:166: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.46.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (i64.load align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:172: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.47.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (f32.load align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:178: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.48.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (f32.load align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:184: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.49.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (f64.load align=0 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:190: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.50.wat:1:46: error: alignment must be power-of-two
+ (module (memory i64 0) (func (drop (f64.load align=7 (i64.const 0)))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:197: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.51.wat:1:42: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i32.store8 align=0 (i64.const 0) (i32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:203: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.52.wat:1:42: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i32.store8 align=7 (i64.const 0) (i32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:209: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.53.wat:1:43: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i32.store16 align=0 (i64.const 0) (i32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:215: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.54.wat:1:43: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i32.store16 align=7 (i64.const 0) (i32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:221: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.55.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i32.store align=0 (i64.const 0) (i32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:227: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.56.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i32.store align=7 (i64.const 0) (i32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:233: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.57.wat:1:42: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store8 align=0 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:239: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.58.wat:1:42: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store8 align=7 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:245: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.59.wat:1:43: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store16 align=0 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:251: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.60.wat:1:43: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store16 align=7 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:257: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.61.wat:1:43: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store32 align=0 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:263: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.62.wat:1:43: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store32 align=7 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:269: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.63.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store align=0 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:275: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.64.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (i64.store align=7 (i64.const 0) (i64.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:281: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.65.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (f32.store align=0 (i64.const 0) (f32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:287: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.66.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (f32.store align=7 (i64.const 0) (f32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:293: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.67.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (f64.store align=0 (i64.const 0) (f32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:299: assert_malformed passed:
+ out/test/spec/memory64/align64/align64.68.wat:1:41: error: alignment must be power-of-two
+ (module (memory i64 0) (func (f64.store align=7 (i64.const 0) (f32.const 0))))
+ ^^^^^^^
+out/test/spec/memory64/align64.wast:306: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:310: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:314: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:318: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:322: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:326: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:330: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:334: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:338: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:342: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:346: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:350: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (8)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:354: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:358: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (8)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:363: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:367: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:371: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:375: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:379: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:383: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:387: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:391: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:395: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:399: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:403: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:407: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (8)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:411: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:415: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (8)
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/align64.wast:420: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:424: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:428: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:432: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (1)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:436: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (2)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:440: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:444: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (8)
+ 0000023: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:448: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (4)
+ 0000026: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:452: assert_invalid passed:
+ error: alignment must not be larger than natural alignment (8)
+ 000002a: error: OnStoreExpr callback failed
+out/test/spec/memory64/align64.wast:864: assert_trap passed: out of bounds memory access: access at 65532+8 >= max value 65536
+131/131 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/bulk64.txt b/test/spec/memory64/bulk64.txt
new file mode 100644
index 00000000..0f95b254
--- /dev/null
+++ b/test/spec/memory64/bulk64.txt
@@ -0,0 +1,33 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/bulk64.wast
+;;; ARGS*: --enable-memory64 --enable-bulk-memory
+(;; STDOUT ;;;
+fill(i64:1, i32:255, i64:3) =>
+fill(i64:0, i32:48042, i64:2) =>
+fill(i64:0, i32:0, i64:65536) =>
+fill(i64:65536, i32:0, i64:0) =>
+out/test/spec/memory64/bulk64.wast:41: assert_trap passed: out of bounds memory access: memory.fill out of bounds
+copy(i64:10, i64:0, i64:4) =>
+copy(i64:8, i64:10, i64:4) =>
+copy(i64:10, i64:7, i64:6) =>
+out/test/spec/memory64/bulk64.wast:90: assert_trap passed: out of bounds memory access: memory.copy out of bound
+copy(i64:65280, i64:0, i64:256) =>
+copy(i64:65024, i64:65280, i64:256) =>
+copy(i64:65536, i64:0, i64:0) =>
+copy(i64:0, i64:65536, i64:0) =>
+out/test/spec/memory64/bulk64.wast:110: assert_trap passed: out of bounds memory access: memory.copy out of bound
+out/test/spec/memory64/bulk64.wast:113: assert_trap passed: out of bounds memory access: memory.copy out of bound
+init(i64:0, i32:1, i32:2) =>
+init(i64:65532, i32:0, i32:4) =>
+out/test/spec/memory64/bulk64.wast:140: assert_trap passed: out of bounds memory access: memory.init out of bounds
+init(i64:65536, i32:0, i32:0) =>
+init(i64:0, i32:4, i32:0) =>
+out/test/spec/memory64/bulk64.wast:151: assert_trap passed: out of bounds memory access: memory.init out of bounds
+out/test/spec/memory64/bulk64.wast:154: assert_trap passed: out of bounds memory access: memory.init out of bounds
+init(i64:0, i32:0, i32:0) =>
+init_passive() =>
+drop_passive() =>
+drop_passive() =>
+drop_active() =>
+65/65 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/endianness64.txt b/test/spec/memory64/endianness64.txt
new file mode 100644
index 00000000..245df153
--- /dev/null
+++ b/test/spec/memory64/endianness64.txt
@@ -0,0 +1,6 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/endianness64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+68/68 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/float_memory64.txt b/test/spec/memory64/float_memory64.txt
new file mode 100644
index 00000000..dff015ca
--- /dev/null
+++ b/test/spec/memory64/float_memory64.txt
@@ -0,0 +1,30 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/float_memory64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+reset() =>
+f32.store() =>
+reset() =>
+i32.store() =>
+reset() =>
+f64.store() =>
+reset() =>
+i64.store() =>
+reset() =>
+f32.store() =>
+reset() =>
+i32.store() =>
+reset() =>
+f64.store() =>
+reset() =>
+i64.store() =>
+reset() =>
+f32.store() =>
+reset() =>
+i32.store() =>
+reset() =>
+f64.store() =>
+reset() =>
+i64.store() =>
+84/84 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/load64.txt b/test/spec/memory64/load64.txt
new file mode 100644
index 00000000..d065e4b0
--- /dev/null
+++ b/test/spec/memory64/load64.txt
@@ -0,0 +1,196 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/load64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+out/test/spec/memory64/load64.wast:214: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.1.wat:1:47: error: unexpected token "i32.load32", expected an instr.
+ (memory i64 1)(func (param i64) (result i32) (i32.load32 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:221: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.2.wat:1:47: error: unexpected token "i32.load32_u", expected an instr.
+ (memory i64 1)(func (param i64) (result i32) (i32.load32_u (local.get 0)))
+ ^^^^^^^^^^^^
+out/test/spec/memory64/load64.wast:228: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.3.wat:1:47: error: unexpected token "i32.load32_s", expected an instr.
+ (memory i64 1)(func (param i64) (result i32) (i32.load32_s (local.get 0)))
+ ^^^^^^^^^^^^
+out/test/spec/memory64/load64.wast:235: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.4.wat:1:47: error: unexpected token "i32.load64", expected an instr.
+ (memory i64 1)(func (param i64) (result i32) (i32.load64 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:242: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.5.wat:1:47: error: unexpected token "i32.load64_u", expected an instr.
+ (memory i64 1)(func (param i64) (result i32) (i32.load64_u (local.get 0)))
+ ^^^^^^^^^^^^
+out/test/spec/memory64/load64.wast:249: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.6.wat:1:47: error: unexpected token "i32.load64_s", expected an instr.
+ (memory i64 1)(func (param i64) (result i32) (i32.load64_s (local.get 0)))
+ ^^^^^^^^^^^^
+out/test/spec/memory64/load64.wast:257: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.7.wat:1:47: error: unexpected token "i64.load64", expected an instr.
+ (memory i64 1)(func (param i64) (result i64) (i64.load64 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:264: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.8.wat:1:47: error: unexpected token "i64.load64_u", expected an instr.
+ (memory i64 1)(func (param i64) (result i64) (i64.load64_u (local.get 0)))
+ ^^^^^^^^^^^^
+out/test/spec/memory64/load64.wast:271: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.9.wat:1:47: error: unexpected token "i64.load64_s", expected an instr.
+ (memory i64 1)(func (param i64) (result i64) (i64.load64_s (local.get 0)))
+ ^^^^^^^^^^^^
+out/test/spec/memory64/load64.wast:279: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.10.wat:1:47: error: unexpected token "f32.load32", expected an instr.
+ (memory i64 1)(func (param i64) (result f32) (f32.load32 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:286: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.11.wat:1:47: error: unexpected token "f32.load64", expected an instr.
+ (memory i64 1)(func (param i64) (result f32) (f32.load64 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:294: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.12.wat:1:47: error: unexpected token "f64.load32", expected an instr.
+ (memory i64 1)(func (param i64) (result f64) (f64.load32 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:301: assert_malformed passed:
+ out/test/spec/memory64/load64/load64.13.wat:1:47: error: unexpected token "f64.load64", expected an instr.
+ (memory i64 1)(func (param i64) (result f64) (f64.load64 (local.get 0)))
+ ^^^^^^^^^^
+out/test/spec/memory64/load64.wast:312: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i32]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:316: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i32]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:320: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i32]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:324: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i32]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:328: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i32]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:332: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:336: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:340: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:344: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:348: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:352: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:356: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [i64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:360: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [f32]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:364: assert_invalid passed:
+ error: type mismatch in function, expected [] but got [f64]
+ 0000022: error: EndFunctionBody callback failed
+out/test/spec/memory64/load64.wast:371: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:372: assert_invalid passed:
+ error: type mismatch in i32.load8_s, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:373: assert_invalid passed:
+ error: type mismatch in i32.load8_u, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:374: assert_invalid passed:
+ error: type mismatch in i32.load16_s, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:375: assert_invalid passed:
+ error: type mismatch in i32.load16_u, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:376: assert_invalid passed:
+ error: type mismatch in i64.load, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:377: assert_invalid passed:
+ error: type mismatch in i64.load8_s, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:378: assert_invalid passed:
+ error: type mismatch in i64.load8_u, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:379: assert_invalid passed:
+ error: type mismatch in i64.load16_s, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:380: assert_invalid passed:
+ error: type mismatch in i64.load16_u, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:381: assert_invalid passed:
+ error: type mismatch in i64.load32_s, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:382: assert_invalid passed:
+ error: type mismatch in i64.load32_u, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:383: assert_invalid passed:
+ error: type mismatch in f32.load, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:384: assert_invalid passed:
+ error: type mismatch in f64.load, expected [i64] but got [f32]
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:388: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 000001f: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:397: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000023: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:407: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000023: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:417: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:427: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000028: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:437: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000023: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:447: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000023: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:457: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000023: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:467: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 000001f: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:476: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 000001f: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:485: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000025: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:495: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 000003c: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:512: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:522: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000021: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:532: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 0000027: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:542: assert_invalid passed:
+ error: type mismatch in i64.load, expected [i64] but got []
+ 000001f: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:551: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 000001f: error: OnLoadExpr callback failed
+out/test/spec/memory64/load64.wast:560: assert_invalid passed:
+ error: type mismatch in i32.load, expected [i64] but got []
+ 000001f: error: OnLoadExpr callback failed
+96/96 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/memory64.txt b/test/spec/memory64/memory64.txt
new file mode 100644
index 00000000..305b267c
--- /dev/null
+++ b/test/spec/memory64/memory64.txt
@@ -0,0 +1,39 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/memory64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+out/test/spec/memory64/memory64.wast:8: assert_invalid passed:
+ error: only one memory block allowed
+ 000000f: error: OnMemory callback failed
+out/test/spec/memory64/memory64.wast:9: assert_invalid passed:
+ error: only one memory block allowed
+ 0000023: error: OnMemory callback failed
+out/test/spec/memory64/memory64.wast:18: assert_invalid passed:
+ 0000000: error: memory variable out of range: 0 (max 0)
+ 000000c: error: BeginDataSegment callback failed
+out/test/spec/memory64/memory64.wast:19: assert_invalid passed:
+ 0000000: error: memory variable out of range: 0 (max 0)
+ 000000c: error: BeginDataSegment callback failed
+out/test/spec/memory64/memory64.wast:20: assert_invalid passed:
+ 0000000: error: memory variable out of range: 0 (max 0)
+ 000000c: error: BeginDataSegment callback failed
+out/test/spec/memory64/memory64.wast:23: assert_invalid passed:
+ 000001b: error: load/store memory 0 out of range 0
+out/test/spec/memory64/memory64.wast:27: assert_invalid passed:
+ 0000020: error: load/store memory 0 out of range 0
+out/test/spec/memory64/memory64.wast:31: assert_invalid passed:
+ 000001b: error: load/store memory 0 out of range 0
+out/test/spec/memory64/memory64.wast:35: assert_invalid passed:
+ 000001d: error: load/store memory 0 out of range 0
+out/test/spec/memory64/memory64.wast:39: assert_invalid passed:
+ error: memory variable out of range: 0 (max 0)
+ 0000019: error: OnMemorySizeExpr callback failed
+out/test/spec/memory64/memory64.wast:43: assert_invalid passed:
+ error: memory variable out of range: 0 (max 0)
+ error: type mismatch in memory.grow, expected [i32] but got [i64]
+ 000001b: error: OnMemoryGrowExpr callback failed
+out/test/spec/memory64/memory64.wast:49: assert_invalid passed:
+ error: max pages (0) must be >= initial pages (1)
+ 000000e: error: OnMemory callback failed
+57/57 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/memory_grow64.txt b/test/spec/memory64/memory_grow64.txt
new file mode 100644
index 00000000..1ffee956
--- /dev/null
+++ b/test/spec/memory64/memory_grow64.txt
@@ -0,0 +1,12 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/memory_grow64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+out/test/spec/memory64/memory_grow64.wast:15: assert_trap passed: out of bounds memory access: access at 0+4 >= max value 0
+out/test/spec/memory64/memory_grow64.wast:16: assert_trap passed: out of bounds memory access: access at 0+4 >= max value 0
+out/test/spec/memory64/memory_grow64.wast:17: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 0
+out/test/spec/memory64/memory_grow64.wast:18: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 0
+out/test/spec/memory64/memory_grow64.wast:24: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_grow64.wast:25: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+45/45 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/memory_redundancy64.txt b/test/spec/memory64/memory_redundancy64.txt
new file mode 100644
index 00000000..0bfbb8b0
--- /dev/null
+++ b/test/spec/memory64/memory_redundancy64.txt
@@ -0,0 +1,9 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/memory_redundancy64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+zero_everything() =>
+zero_everything() =>
+zero_everything() =>
+7/7 tests passed.
+;;; STDOUT ;;)
diff --git a/test/spec/memory64/memory_trap64.txt b/test/spec/memory64/memory_trap64.txt
new file mode 100644
index 00000000..9836fd56
--- /dev/null
+++ b/test/spec/memory64/memory_trap64.txt
@@ -0,0 +1,172 @@
+;;; TOOL: run-interp-spec
+;;; STDIN_FILE: third_party/testsuite/proposals/memory64/memory_trap64.wast
+;;; ARGS*: --enable-memory64
+(;; STDOUT ;;;
+out/test/spec/memory64/memory_trap64.wast:23: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:24: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:25: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:26: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:27: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:28: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:29: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:30: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:31: assert_trap passed: out of bounds memory access: access at 2147549184+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:32: assert_trap passed: out of bounds memory access: access at 2147549184+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:110: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:111: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:112: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:113: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:114: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:115: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:116: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:117: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:118: assert_trap passed: out of bounds memory access: access at 65536+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:119: assert_trap passed: out of bounds memory access: access at 65535+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:120: assert_trap passed: out of bounds memory access: access at 65534+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:121: assert_trap passed: out of bounds memory access: access at 65533+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:122: assert_trap passed: out of bounds memory access: access at 65532+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:123: assert_trap passed: out of bounds memory access: access at 65531+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:124: assert_trap passed: out of bounds memory access: access at 65530+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:125: assert_trap passed: out of bounds memory access: access at 65529+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:126: assert_trap passed: out of bounds memory access: access at 18446744073709551615+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:127: assert_trap passed: out of bounds memory access: access at 18446744073709551614+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:128: assert_trap passed: out of bounds memory access: access at 18446744073709551613+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:129: assert_trap passed: out of bounds memory access: access at 18446744073709551612+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:130: assert_trap passed: out of bounds memory access: access at 18446744073709551611+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:131: assert_trap passed: out of bounds memory access: access at 18446744073709551610+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:132: assert_trap passed: out of bounds memory access: access at 18446744073709551609+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:133: assert_trap passed: out of bounds memory access: access at 18446744073709551608+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:134: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:135: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:136: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:137: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:138: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:139: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:140: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:141: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:142: assert_trap passed: out of bounds memory access: access at 65536+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:143: assert_trap passed: out of bounds memory access: access at 65535+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:144: assert_trap passed: out of bounds memory access: access at 65534+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:145: assert_trap passed: out of bounds memory access: access at 65533+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:146: assert_trap passed: out of bounds memory access: access at 65532+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:147: assert_trap passed: out of bounds memory access: access at 65531+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:148: assert_trap passed: out of bounds memory access: access at 65530+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:149: assert_trap passed: out of bounds memory access: access at 65529+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:150: assert_trap passed: out of bounds memory access: access at 18446744073709551615+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:151: assert_trap passed: out of bounds memory access: access at 18446744073709551614+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:152: assert_trap passed: out of bounds memory access: access at 18446744073709551613+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:153: assert_trap passed: out of bounds memory access: access at 18446744073709551612+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:154: assert_trap passed: out of bounds memory access: access at 18446744073709551611+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:155: assert_trap passed: out of bounds memory access: access at 18446744073709551610+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:156: assert_trap passed: out of bounds memory access: access at 18446744073709551609+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:157: assert_trap passed: out of bounds memory access: access at 18446744073709551608+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:158: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:159: assert_trap passed: out of bounds memory access: access at 18446744073709551615+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:160: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:161: assert_trap passed: out of bounds memory access: access at 65535+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:162: assert_trap passed: out of bounds memory access: access at 18446744073709551615+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:163: assert_trap passed: out of bounds memory access: access at 18446744073709551614+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:164: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:165: assert_trap passed: out of bounds memory access: access at 18446744073709551615+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:166: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:167: assert_trap passed: out of bounds memory access: access at 65535+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:168: assert_trap passed: out of bounds memory access: access at 18446744073709551615+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:169: assert_trap passed: out of bounds memory access: access at 18446744073709551614+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:170: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:171: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:172: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:173: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:174: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:175: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:176: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:177: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:178: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:179: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:180: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:181: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:182: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:183: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:184: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:185: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:186: assert_trap passed: out of bounds memory access: access at 65536+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:187: assert_trap passed: out of bounds memory access: access at 65535+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:188: assert_trap passed: out of bounds memory access: access at 65534+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:189: assert_trap passed: out of bounds memory access: access at 65533+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:190: assert_trap passed: out of bounds memory access: access at 65532+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:191: assert_trap passed: out of bounds memory access: access at 65531+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:192: assert_trap passed: out of bounds memory access: access at 65530+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:193: assert_trap passed: out of bounds memory access: access at 65529+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:194: assert_trap passed: out of bounds memory access: access at 18446744073709551615+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:195: assert_trap passed: out of bounds memory access: access at 18446744073709551614+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:196: assert_trap passed: out of bounds memory access: access at 18446744073709551613+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:197: assert_trap passed: out of bounds memory access: access at 18446744073709551612+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:198: assert_trap passed: out of bounds memory access: access at 18446744073709551611+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:199: assert_trap passed: out of bounds memory access: access at 18446744073709551610+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:200: assert_trap passed: out of bounds memory access: access at 18446744073709551609+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:201: assert_trap passed: out of bounds memory access: access at 18446744073709551608+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:202: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:203: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:204: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:205: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:206: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:207: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:208: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:209: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:210: assert_trap passed: out of bounds memory access: access at 65536+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:211: assert_trap passed: out of bounds memory access: access at 65535+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:212: assert_trap passed: out of bounds memory access: access at 65534+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:213: assert_trap passed: out of bounds memory access: access at 65533+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:214: assert_trap passed: out of bounds memory access: access at 65532+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:215: assert_trap passed: out of bounds memory access: access at 65531+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:216: assert_trap passed: out of bounds memory access: access at 65530+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:217: assert_trap passed: out of bounds memory access: access at 65529+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:218: assert_trap passed: out of bounds memory access: access at 18446744073709551615+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:219: assert_trap passed: out of bounds memory access: access at 18446744073709551614+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:220: assert_trap passed: out of bounds memory access: access at 18446744073709551613+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:221: assert_trap passed: out of bounds memory access: access at 18446744073709551612+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:222: assert_trap passed: out of bounds memory access: access at 18446744073709551611+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:223: assert_trap passed: out of bounds memory access: access at 18446744073709551610+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:224: assert_trap passed: out of bounds memory access: access at 18446744073709551609+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:225: assert_trap passed: out of bounds memory access: access at 18446744073709551608+8 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:226: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:227: assert_trap passed: out of bounds memory access: access at 18446744073709551615+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:228: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:229: assert_trap passed: out of bounds memory access: access at 18446744073709551615+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:230: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:231: assert_trap passed: out of bounds memory access: access at 65535+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:232: assert_trap passed: out of bounds memory access: access at 18446744073709551615+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:233: assert_trap passed: out of bounds memory access: access at 18446744073709551614+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:234: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:235: assert_trap passed: out of bounds memory access: access at 65535+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:236: assert_trap passed: out of bounds memory access: access at 18446744073709551615+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:237: assert_trap passed: out of bounds memory access: access at 18446744073709551614+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:238: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:239: assert_trap passed: out of bounds memory access: access at 18446744073709551615+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:240: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:241: assert_trap passed: out of bounds memory access: access at 18446744073709551615+1 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:242: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:243: assert_trap passed: out of bounds memory access: access at 65535+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:244: assert_trap passed: out of bounds memory access: access at 18446744073709551615+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:245: assert_trap passed: out of bounds memory access: access at 18446744073709551614+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:246: assert_trap passed: out of bounds memory access: access at 65536+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:247: assert_trap passed: out of bounds memory access: access at 65535+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:248: assert_trap passed: out of bounds memory access: access at 18446744073709551615+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:249: assert_trap passed: out of bounds memory access: access at 18446744073709551614+2 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:250: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:251: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:252: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:253: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:254: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:255: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:256: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:257: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:258: assert_trap passed: out of bounds memory access: access at 65536+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:259: assert_trap passed: out of bounds memory access: access at 65535+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:260: assert_trap passed: out of bounds memory access: access at 65534+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:261: assert_trap passed: out of bounds memory access: access at 65533+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:262: assert_trap passed: out of bounds memory access: access at 18446744073709551615+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:263: assert_trap passed: out of bounds memory access: access at 18446744073709551614+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:264: assert_trap passed: out of bounds memory access: access at 18446744073709551613+4 >= max value 65536
+out/test/spec/memory64/memory_trap64.wast:265: assert_trap passed: out of bounds memory access: access at 18446744073709551612+4 >= max value 65536
+170/170 tests passed.
+;;; STDOUT ;;)
diff --git a/test/update-spec-tests.py b/test/update-spec-tests.py
index a78f8bd1..a34686bf 100755
--- a/test/update-spec-tests.py
+++ b/test/update-spec-tests.py
@@ -93,6 +93,7 @@ def main(args):
ProcessProposalDir('bulk-memory-operations', '--enable-bulk-memory')
ProcessProposalDir('reference-types', '--enable-reference-types')
ProcessProposalDir('simd', '--enable-simd')
+ ProcessProposalDir('memory64', '--enable-memory64')
return 0