Fix table64 test
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index 54da594..25e3cc0 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -460,7 +460,7 @@
'ref_null.wast', # Requires ref.null wast constants
'return_call_indirect.wast', # Requires more precise unreachable validation
'select.wast', # Requires ref.null wast constants
- 'table.wast', # Requires support for table default elements
+ # 'table.wast', # Requires support for table default elements
'unreached-invalid.wast', # Requires more precise unreachable validation
'array.wast', # Requires support for table default elements
'br_if.wast', # Requires more precise branch validation
diff --git a/src/wasm.h b/src/wasm.h
index 605c702..2d20265 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -2419,9 +2419,9 @@
class Table : public Importable {
public:
static const Address::address32_t kPageSize = 1;
- static const Index kUnlimitedSize = Index(-1);
+ static const uint64_t kUnlimitedSize = -1ull;
// In wasm32/64, the maximum table size is limited by a 32-bit pointer: 4GB
- static const Index kMaxSize = Index(-1);
+ static const Index kMaxSize = Index(-1ull);
Address initial = 0;
Address max = kMaxSize;
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 0a1df50..379ea13 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -4595,9 +4595,13 @@
auto funcref = Type(HeapType::func, Nullable);
for (auto& table : module.tables) {
- info.shouldBeTrue(table->initial <= table->max,
- "table",
- "size minimum must not be greater than maximum");
+ // info.shouldBeTrue(table->initial != 0 || table->initial <= table->max,
+ info.shouldBeTrue(
+ table->initial <= table->max,
+ "table",
+ (std::string("size minimum must not be greater than maximum ") +
+ std::to_string(table->initial) + " " + std::to_string(table->max))
+ .c_str());
info.shouldBeTrue(
table->type.isNullable(),
"table",