bug: parallel callable lowering panics "alias metadata operand: ParseIntError { kind: Empty }" on inline !alias.scope !{...} from indexed owner loops
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust, typescript
Direzione di ricerca
Start by reading crates/perry-codegen/src/codegen/callable_reloc.rs around line 149 and the metadata emission in stmt/indexed_owner_loop.rs around line 830. Reproduce with the provided owner_scope_workers.ts and perry compile owner_scope_workers.ts --no-link -o a.o; compare with the single-worker settings. Done when parallel compilation handles the inline alias metadata without panicking and the reproduction compiles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
perry compile panics in crates/perry-codegen/src/codegen/callable_reloc.rs:149 with alias metadata operand: ParseIntError { kind: Empty }. It happens when a module has an indexed owner loop (a typed-array read-modify-write through local aliases) and enough functions that callable lowering runs in parallel.
Cause (from the code at 86988bec62): the parallel callable relocation (callable_reloc.rs) renumbers metadata after "!alias.scope !" / "!noalias !" and expects a numbered operand (!alias.scope !12). But stmt/indexed_owner_loop.rs:830 emits inline metadata nodes: , !alias.scope !{...}, !noalias !{...}. So the digit scan finds an empty string, and .parse().expect("alias metadata operand") panics. Expected: skip (or recurse into) inline !{...} operands, or have the owner loop emit numbered metadata.
Reproduction
owner_scope_workers.ts (80 one-line closures to make the module big enough for parallel lowering, plus the loop):
const pad0 = (x: any) => [x, 'p0'];
const pad1 = (x: any) => [x, 'p1'];
// ... pad2 .. pad78, the same shape ...
const pad79 = (x: any) => [x, 'p79'];
const operate = (a: Float64Array, scale: any, b: Float64Array) => { for (let i = 0; i < 4; i++) { const x = a; const j = i; x[j] = x[j] + b[i]; } return a[0]; };
console.log(operate(new Float64Array(4), 1, new Float64Array(4)), pad0(1));
Generate it with: (for i in $(seq 0 79); do echo "const pad$i = (x: any) => [x, 'p$i'];"; done; echo '<the operate and console.log lines above>') > owner_scope_workers.ts
perry compile owner_scope_workers.ts --no-link -o a.o
Error: perry crashed unexpectedly.
thread 'perry-module-0' panicked at crates/perry-codegen/src/codegen/callable_reloc.rs:149:59:
alias metadata operand: ParseIntError { kind: Empty }
With PERRY_CODEGEN_UNIT_JOBS=1 PERRY_MODULE_JOBS=1 the same file compiles and runs: it prints 0 [ 1, 'p0' ], as Node does.
Environment
- PerryTS/perry main 86988bec62 (pristine, current head), and 08c74942f1. Linux host build (
cargo build --release -p perry --no-default-features --features dev-cliplus the runtime/stdlib static archives); default compile settings. - Linux x86_64, 32 threads, Ubuntu 24.04.
- Lingua principale
- Rust
- Stelle
- 4.9k
- Fork
- 166
- Merge medio
- 4h 54m
- PR unite (30g)
- 909
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PerryTS/perry
-
area:compiler effort:S impact:med platform:windows type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area:compiler effort:S impact:med type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area:runtime-gc effort:S impact:low platform:linux type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
PerryTS/perry#14789 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
area:runtime-gc effort:L impact:med type:perf
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PerryTS/perry
Issue simili
-
<input type="number"> misses text-entry leaf sizing in layoutForse già presa @GoCoder7 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
DioxusLabs/blitz#1675 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: NP 管理器文件编辑器里删除键无效Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
metasequoiaime/msime#11666 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
bug drawings help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
userFRM/egui-charts#3479 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
s2-streamstore/cachey#225 ·
I maintainer di solito rispondono entro 1 giorno