Stream: git-wasmtime

Topic: wasmtime / issue #5711 Cranelift: `uextend.i128` is optim...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 04 2023 at 13:52):

afonso360 edited issue #5711:

:wave: Hey,

Fuzzgen pointed this out today.

.clif Test Case

test compile
set opt_level=speed
target x86_64

function u1:0() system_v {
block0:
    v0 = iconst.i64 0
    v1 = uextend.i128 v0  ; v0 = 0
    v2 = icmp_imm eq v1, 0xd700_0008_08be_ff00
    brif v2, block1, block1

block1:
    return
}

Steps to Reproduce

Expected Results

The test to pass

Actual Results

thread 'worker #0' panicked at 'unimplemented for > 64 bits', cranelift/codegen/src/opts.rs:89:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: unimplemented for > 64 bits
FAIL ./lmao.clif: panicked in worker #0: unimplemented for > 64 bits
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: x86_64

Extra Info

This was introduced in 97381792ac301271f691d6c69f16ad1130df1286 (cc @jameysharp), it looks like we are extending the uextend into a iconst.i128 which does not exist.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2023 at 19:38):

cfallin commented on issue #5711:

This is also this oss-fuzz issue, when it becomes public, which is very similar except for riscv64.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2023 at 19:43):

cfallin commented on issue #5711:

Also this oss-fuzz issue.

Just to write it here so we don't forget: once we resolve this, we'll want to backport it to the 6.0 branch, which forked recently (and get it in before the release on Feb 20!).

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2023 at 19:44):

cfallin commented on issue #5711:

Finally this oss-fuzz issue also appears to be this bug.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 06 2023 at 15:55):

bjorn3 commented on issue #5711:

Hit this while checking for regressions in the Cranelift 0.93 branch: https://github.com/bjorn3/rustc_codegen_cranelift/actions/runs/4105124329/jobs/7081547989

view this post on Zulip Wasmtime GitHub notifications bot (Feb 06 2023 at 16:05):

jameysharp commented on issue #5711:

Dang, I found this bug while fuzzing on Friday but I thought it was from the branch I was working on rather than main, so I figured I'd leave it until today.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 06 2023 at 17:34):

jameysharp closed issue #5711:

:wave: Hey,

Fuzzgen pointed this out today.

.clif Test Case

test compile
set opt_level=speed
target x86_64

function u1:0() system_v {
block0:
    v0 = iconst.i64 0
    v1 = uextend.i128 v0  ; v0 = 0
    v2 = icmp_imm eq v1, 0xd700_0008_08be_ff00
    brif v2, block1, block1

block1:
    return
}

Steps to Reproduce

Expected Results

The test to pass

Actual Results

thread 'worker #0' panicked at 'unimplemented for > 64 bits', cranelift/codegen/src/opts.rs:89:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: unimplemented for > 64 bits
FAIL ./lmao.clif: panicked in worker #0: unimplemented for > 64 bits
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main
Operating system: Linux
Architecture: x86_64

Extra Info

This was introduced in 97381792ac301271f691d6c69f16ad1130df1286 (cc @jameysharp), it looks like we are extending the uextend into a iconst.i128 which does not exist.


Last updated: Nov 22 2024 at 16:03 UTC