Skip to content

Instantly share code, notes, and snippets.

@eholk
Created March 11, 2017 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eholk/6d1f698cda3d3788681ac8563c5f6165 to your computer and use it in GitHub Desktop.
Save eholk/6d1f698cda3d3788681ac8563c5f6165 to your computer and use it in GitHub Desktop.
[wasm-validator error in function $real_main] 1 != 0: function body type must match, if function returns, on
[none] [none] (block
[unreachable] (block $block$1$break
[none] (set_local $6
[i32] (i32.load
[i32] (i32.const 0)
)
)
[unreachable] [unreachable] (block
[unreachable] (br $block$1$break)
)
)
[none] [none] (block
[none] (block $bb0
[none] (set_local $0
[i32] (i32.const 1)
)
[none] (set_local $2
[i32] (get_local $0)
)
[none] (set_local $8
[i64] (i64.add
[i64] (i64.extend_s/i32
[i32] (get_local $2)
)
[i64] (i64.extend_s/i32
[i32] (i32.const 2)
)
)
)
[none] (i32.store
[i32] (i32.const 0)
[i32] (tee_local $3
[i32] (i32.sub
[i32] (i32.load
[i32] (i32.const 0)
)
[i32] (i32.const 128)
)
)
)
[none] (i32.store
[i32] (get_local $3)
[i32] (i32.wrap/i64
[i64] (get_local $8)
)
)
[none] (i32.store offset=4
[i32] (get_local $3)
[i32] (i32.wrap/i64
[i64] (i64.shr_u
[i64] (get_local $8)
[i64] (i64.const 32)
)
)
)
)
[none] (if
[i32] (i32.load offset=8
[i32] (get_local $3)
)
[unreachable] [unreachable] (block
[unreachable] (block
[unreachable] (block $bb1
[none] (set_local $1
[i32] (i32.load
[i32] (get_local $3)
)
)
[none] (set_local $4
[i32] (get_local $1)
)
[none] (set_local $5
[i32] (get_local $4)
)
[none] (i32.store
[i32] (i32.const 0)
[i32] (get_local $6)
)
[unreachable] (return
[i32] (get_local $5)
)
)
)
)
[unreachable] [unreachable] (block
[unreachable] (block
[unreachable] (unreachable)
)
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment