kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

data_drop_then_init.wat (277B)


      1 (module
      2   (memory 1)
      3   (data $seg "\01\02\03\04")
      4   (func (export "test_main") (result i32)
      5     ;; Drop the passive segment, then memory.init of nonzero length must trap.
      6     data.drop $seg
      7     i32.const 0
      8     i32.const 0
      9     i32.const 4
     10     memory.init $seg
     11     i32.const 0))