-
Notifications
You must be signed in to change notification settings - Fork 201
[panic] assert failed in cranelift_entity (only using compile fuzzer) #1306
Comments
I looked at the wasm file posted in zip:
That function index is equal to |
|
Actually maybe I'm wrong here, if wasm-objdump also thinks this is an invalid index. Let me re-read the spec more carefully... |
Hmmm... the following seems to suggest that https://webassembly.github.io/spec/core/syntax/modules.html#syntax-index
https://webassembly.github.io/spec/core/syntax/values.html#syntax-int
I suppose the real issue is that wherever we are constructing the entity, we aren't first checking that the index is within the number of functions that this module actually has (and also somewhere ensuring taht we don't allow |
reduced test case: |
As an implementation-specific limit, we do not allow the full index space of `0..=2^21 - 1` because we reserve index `2^32 - 1` for ourselves in `cranelift-entity`. Fixes bytecodealliance#1306
As an implementation-specific limit, we do not allow the full index space of `0..=2^32 - 1` because we reserve index `2^32 - 1` for ourselves in `cranelift-entity`. Fixes bytecodealliance#1306
As an implementation-specific limit, we do not allow the full index space of `0..=2^32 - 1` because we reserve index `2^32 - 1` for ourselves in `cranelift-entity`. Fixes bytecodealliance#1306
As an implementation-specific limit, we do not allow the full index space of `0..=2^32 - 1` because we reserve index `2^32 - 1` for ourselves in `cranelift-entity`. Fixes #1306
Issue description
During fuzzing of lightbeam, i found this crash that seems to be related to cranelift.
Note: crash will not happen if you are calling
wasmtime
binary but only usingcompile
API.Also, the crash happen using both fuzzing strategy (i.e. cranelift or ligthbeam)
Reproduction
Download assert_failed_cranelift_entity.zip
Run the fuzzer:
wasmtime commit: 086ff63
Crash details
The text was updated successfully, but these errors were encountered: