Cranelift s390x: `stack_limit` load chain with a large offset panics

Aperta
#15,280 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #15506 di @orshih6 — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
compilers

Direzione di ricerca

The panic is the assertion base != tmp.to_reg() at line 169 of cranelift/codegen/src/isa/s390x/inst/emit.rs, reached while lowering the stack_limit load chain with a large offset. Start from that assertion and check which register is used as the base versus the temporary when the offset does not fit the instruction's displacement. Run the repro through clif-util compile --target s390x and confirm the panic. Done means the repro compiles and a filetest under cranelift/filetests covers the case.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug cranelift cranelift:area:s390x

This input:

test compile
target s390x

function %f(i64 vmctx) {
    gv0 = vmctx
    gv1 = load.i64 notrap aligned gv0+8
    gv2 = load.i64 notrap aligned gv1+524288
    stack_limit = gv2
    ss0 = explicit_slot 20
block0(v0: i64):
    return
}

fails with:

$ clif-util compile --target s390x repro.clif
thread 'main' panicked at cranelift/codegen/src/isa/s390x/inst/emit.rs:169:17:
assertion failed: base != tmp.to_reg()
Lingua principale
Rust
Stelle
18.9k
Fork
2k
Merge medio
1g 6h
PR unite (30g)
238

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bytecodealliance/wasmtime

Tutte le issue di bytecodealliance/wasmtime

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.