Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMD precompute fuzz testcase #2391

Closed
kripken opened this issue Oct 16, 2019 · 1 comment
Closed

SIMD precompute fuzz testcase #2391

kripken opened this issue Oct 16, 2019 · 1 comment
Assignees

Comments

@kripken
Copy link
Member

kripken commented Oct 16, 2019

STR

BINARYEN_PASS_DEBUG=1 BINARYEN_MAX_INTERPRETER_DEPTH=1000 wasm-opt --fuzz-exec --fuzz-binary -O3 --all-features --disable-threads --disable-bulk-memory --disable-exception-handling --disable-nontrapping-float-to-int --disable-tail-call reduced.wasm

on

(module
 (type $0 (func (result i32)))
 (type $1 (func))
 (type $2 (func (param i64) (result f64)))
 (type $3 (func (param f32 v128) (result v128)))
 (type $4 (func (result v128)))
 (type $5 (func (result f64)))
 (type $6 (func (param f64 i32) (result f64)))
 (memory $0 1 1)
 (global $global$0 (mut i32) (i32.const 10))
 (func $0 (; 0 ;) (type $0) (result i32)
  (i32.const 0)
 )
 (func $1 (; 1 ;) (type $1)
  (nop)
 )
 (func $2 (; 2 ;) (type $2) (param $0 i64) (result f64)
  (f64.const 1)
 )
 (func $3 (; 3 ;) (type $3) (param $0 f32) (param $1 v128) (result v128)
  (v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000)
 )
 (func $4 (; 4 ;) (type $4) (result v128)
  (drop
   (f64x2.extract_lane 1
    (v16x8.load_splat offset=22 align=1
     (i32.const 1)
    )
   )
  )
  (v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000)
 )
 (func $5 (; 5 ;) (type $5) (result f64)
  (f64.const 1)
 )
 (func $6 (; 6 ;) (type $6) (param $0 f64) (param $1 i32) (result f64)
  (f64.const 1)
 )
)

Fails with

[PassRunner]   running pass: precompute-propagate...           wasm-opt: binaryen/src/wasm-interpreter.h:1091: wasm::Flow wasm::ExpressionRunner<SubType>::visitSIMDLoad(wasm::SIMDLoad*) [with SubType = wasm::PrecomputingExpressionRunner]: Assertion `false' failed.
@kripken kripken changed the title SIMD fuzz testcase SIMD precompute fuzz testcase Oct 16, 2019
@tlively
Copy link
Member

tlively commented Nov 6, 2019

Fixed by #2409.

@tlively tlively closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants