Skip to content

Fuzz bug with DCE on pop moved into block in old EH #6918

Description

@kripken
(module
 (type $struct (struct (field (mut (ref null eq)))))

 (tag $tag (param (ref null eq)))

 (func $0 (result i32)
  (try (result i32)
   (do
    (i32.const 0)
   )
   (catch $tag
    (drop
     (ref.eq
      (struct.new $struct
       (pop (ref null eq))
      )
      (unreachable)
     )
    )
    (i32.const 0)
   )
   (catch_all
    (i32.const 0)
   )
  )
 )
)
$ bin/wasm-opt a.wat -all --dce 
[wasm-validator error in function 0] unexpected false: , on 
(try (result i32)
 (do
  (i32.const 0)
 )
 (catch $tag
  (block
   (drop
    (struct.new $struct
     (pop eqref)
    )
   )
   (unreachable)
  )
 )
 (catch_all
  (i32.const 0)
 )
)
catch's body (tag)'s pop's location is not validFatal: error after opts

cc @aheejin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions