Skip to content

Fuzz bug: interpretation of return_call is not correct. #6436

@tlively

Description

@tlively

This module behaves differently in our interpreter and in v8:

(module
 (import "fuzzing-support" "log-i32" (func $log (param i32)))
 (tag $t (param))

 (func $throw
  (throw $t)
 )

 (func $try-retcall
  (try $label$3
   (do
    (return_call $throw)
   )
   (catch $t)
  )
 )

 (func $test (export "test")
  (call $try-retcall)
  (call $log
   (i32.const 0)
  )
 )
)

Since we interpret return_call as call + return, the thrown exception is caught by the try and $test continues on to call $log. The correct behavior is that $try-retcall should return and then $throw should be called, so $test should propagate the exception and never call $log.

Metadata

Metadata

Assignees

No one assigned

    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