File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -3311,12 +3311,15 @@ class ModuleRunnerBase : public ExpressionRunner<SubType> {
33113311 importedInstance->wasm .getExportOrNull ((*memory)->base );
33123312 Memory exportedMemory =
33133313 *importedInstance->wasm .getMemory (*export_->getInternalName ());
3314- exportedMemory.initial = importedInstance->getMemorySize ();
3315- // Address initial = importedInstance->getMemorySize();
3316- if (!(*memory)->isSubType (*exportedMemory)) {
3314+ // exportedMemory.initial =
3315+ // importedInstance->getMemorySize(*export_->getInternalName());
3316+
3317+ // todo which way?
3318+ // if (!(*memory)->isSubType(exportedMemory)) {
3319+ if (!exportedMemory.isSubType (**memory)) {
33173320 trap ((std::stringstream ()
33183321 << " Imported memory isn't compatible. Imported memory: "
3319- << **memory << " . Exported memory: " << * exportedMemory)
3322+ << **memory << " . Exported memory: " << exportedMemory)
33203323 .str ());
33213324 }
33223325 }
Original file line number Diff line number Diff line change @@ -2494,8 +2494,8 @@ class Memory : public Importable {
24942494 }
24952495
24962496 static bool isSubType (const Memory& a, const Memory& b) {
2497- return a.addressType == b.addressType && a.initial < = b.initial &&
2498- a.max > = b.max ;
2497+ return a.addressType == b.addressType && a.initial > = b.initial &&
2498+ a.max < = b.max ;
24992499 }
25002500
25012501 bool isSubType (const Memory& other) {
You can’t perform that action at this time.
0 commit comments