1;;! memory64 = true 2;;! multi_memory = true 3 4;; 64 => 64 5(module 6 (memory $a i64 1) 7 (memory $b i64 1) 8 9 (func (export "copy") (param i64 i64 i64) 10 local.get 0 11 local.get 1 12 local.get 2 13 memory.copy $a $b) 14) 15(invoke "copy" (i64.const 0) (i64.const 0) (i64.const 100)) 16(assert_trap 17 (invoke "copy" (i64.const 0x1_0000_0000) (i64.const 0) (i64.const 0)) 18 "out of bounds memory access") 19 20;; 32 => 64 21(module 22 (memory $a i32 1) 23 (memory $b i64 1) 24 25 (func (export "copy") (param i32 i64 i32) 26 local.get 0 27 local.get 1 28 local.get 2 29 memory.copy $a $b) 30) 31(invoke "copy" (i32.const 0) (i64.const 0) (i32.const 100)) 32(assert_trap 33 (invoke "copy" (i32.const 0) (i64.const 0x1_0000_0000) (i32.const 0)) 34 "out of bounds memory access") 35 36;; 64 => 32 37(module 38 (memory $a i64 1) 39 (memory $b i32 1) 40 41 (func (export "copy") (param i64 i32 i32) 42 local.get 0 43 local.get 1 44 local.get 2 45 memory.copy $a $b) 46) 47(invoke "copy" (i64.const 0) (i32.const 0) (i32.const 100)) 48(assert_trap 49 (invoke "copy" (i64.const 0x1_0000_0000) (i32.const 0) (i32.const 0)) 50 "out of bounds memory access") 51 52