Stream: git-wasmtime

Topic: wasmtime / issue #4234 Cranelift: atomic_cas lowering cau...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2022 at 17:27):

cfallin edited issue #4234:

.clif Test Case

None reduced yet.

Steps to Reproduce

Try testing cg_clif with latest cranelift master.

Expected Results

CI passes

Actual Result

https://github.com/bjorn3/rustc_codegen_cranelift/actions/runs/2451819915

thread 'rustc' panicked at 'index out of bounds: the len is 96 but the index is 4294967295', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/regalloc2-0.2.2/src/ion/merge.rs:35:38

Versions and Environment

Cranelift version or commit: 3f152273

Operating system: Linux

Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2022 at 17:35):

cfallin commented on issue #4234:

The lowering of the minimized testcase above contains the following VCode instruction:

  Inst 5: lock cmpxchgl %v136l, 0(%v2097151), expected=%v135l, dst_old=%eax

v2097151 is VReg::invalid() (2^21 bits for vreg field, and 2097151 is 2^21 - 1).

view this post on Zulip Wasmtime GitHub notifications bot (Jun 07 2022 at 17:47):

cfallin commented on issue #4234:

Ah, atomic_cas is actually a bit of a red herring -- it's just the immediate cause here because it switches to using ISLE's address mode lowering. But it's actually a bug in to_amode where, if an address expression is all constants and no registers, we get an invalid_reg as base. Fix in #4239.


Last updated: Oct 23 2024 at 20:03 UTC