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