Stream: git-wasmtime

Topic: wasmtime / issue #4693 Cranelift: hit unreachable case wh...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 20:12):

elliottt opened issue #4693:

.clif Test Case

function %f13(f32x4) -> i32x4 {
block0(v0: f32x4):
  v1 = fcvt_to_uint.i32x4 v0
  return v1
}

Steps to Reproduce

Compiling this causes an unreachable case to be reached: https://github.com/bytecodealliance/wasmtime/blob/380db48ce6b7a754025e33bde02a8d14897376f3/cranelift/codegen/src/isa/x64/lower.rs#L800-L804

Expected Results

Either an error or a successful compilation.

Actual Results

Panic

Versions and Environment

Cranelift version or commit: 0c2e0494bdc63518962ad2773abc13d7d1d1dd8a

Operating system: linux

Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 20:12):

elliottt labeled issue #4693:

.clif Test Case

function %f13(f32x4) -> i32x4 {
block0(v0: f32x4):
  v1 = fcvt_to_uint.i32x4 v0
  return v1
}

Steps to Reproduce

Compiling this causes an unreachable case to be reached: https://github.com/bytecodealliance/wasmtime/blob/380db48ce6b7a754025e33bde02a8d14897376f3/cranelift/codegen/src/isa/x64/lower.rs#L800-L804

Expected Results

Either an error or a successful compilation.

Actual Results

Panic

Versions and Environment

Cranelift version or commit: 0c2e0494bdc63518962ad2773abc13d7d1d1dd8a

Operating system: linux

Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 20:12):

elliottt labeled issue #4693:

.clif Test Case

function %f13(f32x4) -> i32x4 {
block0(v0: f32x4):
  v1 = fcvt_to_uint.i32x4 v0
  return v1
}

Steps to Reproduce

Compiling this causes an unreachable case to be reached: https://github.com/bytecodealliance/wasmtime/blob/380db48ce6b7a754025e33bde02a8d14897376f3/cranelift/codegen/src/isa/x64/lower.rs#L800-L804

Expected Results

Either an error or a successful compilation.

Actual Results

Panic

Versions and Environment

Cranelift version or commit: 0c2e0494bdc63518962ad2773abc13d7d1d1dd8a

Operating system: linux

Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:26):

jlb6740 commented on issue #4693:

Hi @elliottt . Does this unreachable case get hit before patch https://github.com/bytecodealliance/wasmtime/pull/4684 ?
I have not tried, but the comments here say this unreachable is guarded by both the Opcode::FcvtToUnit and Opcode::FcvtToSint. It looks like 4864 removed one of those branches and if so I wondering if that patch (removing that code) introduced the possibility of this fall through?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:46):

elliottt commented on issue #4693:

I hit the panic at c4fd6a95da582a4a21802d981062c9202746ef19, which is the direct parent of #4684. This panic is from fcvt_to_uint, vs fcvt_from_uint which was ported to ISLE in #4684.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2022 at 22:46):

elliottt edited a comment on issue #4693:

I hit the panic at c4fd6a95da582a4a21802d981062c9202746ef19, which is the direct parent of #4684. This panic is from fcvt_to_uint, vs fcvt_from_uint which was ported to ISLE in #4684.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2022 at 22:53):

jlb6740 commented on issue #4693:

Hi @elliottt. I went to try and reproduce this issue and noticed that I was seeing the unreachable code but not where this original bug filing notes it. Looks like code has changed with https://github.com/bytecodealliance/wasmtime/pull/4704. Was that patch supposed to resolve this issue? I can reproduce still with this file:

test run
target x86_64

function %f13(f32x4) -> i32x4 {
block0(v0: f32x4):
v1 = fcvt_to_uint.i32x4 v0
return v1
}

; run: %f13([0x1.0 0.0 0x1.0 0x75bcd18.0]) == [1 0 1 123456789])

run with:

RUST_BACKTRACE=1 ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2022 at 23:12):

jlb6740 deleted a comment on issue #4693:

Hi @elliottt. I went to try and reproduce this issue and noticed that I was seeing the unreachable code but not where this original bug filing notes it. Looks like code has changed with https://github.com/bytecodealliance/wasmtime/pull/4704. Was that patch supposed to resolve this issue? I can reproduce still with this file:

test run
target x86_64

function %f13(f32x4) -> i32x4 {
block0(v0: f32x4):
v1 = fcvt_to_uint.i32x4 v0
return v1
}

; run: %f13([0x1.0 0.0 0x1.0 0x75bcd18.0]) == [1 0 1 123456789])

run with:

RUST_BACKTRACE=1 ./target/debug/clif-util test cranelift/filetests/filetests/runtests/test.clif

view this post on Zulip Wasmtime GitHub notifications bot (Aug 29 2022 at 15:40):

abrown closed issue #4693:

.clif Test Case

function %f13(f32x4) -> i32x4 {
block0(v0: f32x4):
  v1 = fcvt_to_uint.i32x4 v0
  return v1
}

Steps to Reproduce

Compiling this causes an unreachable case to be reached: https://github.com/bytecodealliance/wasmtime/blob/380db48ce6b7a754025e33bde02a8d14897376f3/cranelift/codegen/src/isa/x64/lower.rs#L800-L804

Expected Results

Either an error or a successful compilation.

Actual Results

Panic

Versions and Environment

Cranelift version or commit: 0c2e0494bdc63518962ad2773abc13d7d1d1dd8a

Operating system: linux

Architecture: x86_64


Last updated: Nov 22 2024 at 16:03 UTC