Native CLI (scriptc.exe) segfaults on a large program that the same release compiles under Node
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- nodejs, typescript
- Ambito
- compilers
Direzione di ricerca
The crash is in the natively compiled CLI bin/scriptc.exe during scriptc coverage and scriptc build, with no reproduction because the app source is private. The entry point to read is packages/cli/src/main.ts, which the reporter ran under Node as a working comparison. Start by building a symbolized CLI and reproducing the crash on a large entry. Done means the native CLI finishes coverage on that entry without SIGSEGV and matches the Node output.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The native CLI that the scriptc npm package installs (bin/scriptc.exe, linux-x64-gnu) crashes with SIGSEGV (exit 139) on a large program, before it prints any report. The same release's compiler, run as JavaScript under Node, analyzes and builds the same program without errors.
Environment
- scriptc 0.4.12 from npm (
scriptcwith@scriptc/cli-linux-x64-gnu); 0.4.11 from npm crashes the same way. - Linux 6.8.0 x86_64, glibc 2.39.
- Node v24.22.0 for the JavaScript run.
What happens
scriptc coverage crashes with exit 139 and no report:
$ scriptc coverage src/main.ts --print=diagnostics --fail-on=blockers
Segmentation fault (core dumped)
scriptc build of the same entry, with the app's FFI manifest, crashes the same way.
The entry is a terminal app of about 25,000 statements: a TypeScript app on light's native packages. The coverage crash doesn't need its FFI manifest. Smaller entries from the same workspace (41 of light's own coverage entries and 118 of the app's test entries) pass scriptc coverage with the native CLI.
The crash doesn't depend on the stack limit: it also happens under ulimit -s unlimited. The binary is stripped, and gdb shows a shallow stack, so this isn't deep recursion:
Thread 1 "scriptc.exe" received signal SIGSEGV, Segmentation fault.
0x0000000005e3ec38 in ?? ()
#0 0x0000000005e3ec38 in ?? ()
#1 0x0000000002f9e1a7 in ?? ()
#2 0x0000000002ef6c6e in ?? ()
#3 0x0000000002f792c8 in ?? ()
#4 0x00000000040a0037 in ?? ()
#5 0x00000000040a01fc in ?? ()
#6 0x0000000004283b49 in ?? ()
#7 0x0000000004c778af in ?? ()
#8 0x00000000037048ba in ?? ()
#9 0x00000000044b644d in ?? ()
#10 0x0000000003ae2a4f in ?? ()
#11 0x0000000002f8e6ac in ?? ()
#12 0x000000000299830d in ?? ()
#13 0x000000000298cbb1 in ?? ()
#14 __libc_start_call_main (main=0x298c880, argc=4, ...)
What works
The same program compiles when the compiler runs under Node:
@scriptc/compiler0.4.12 from npm, driven by a copy ofpackages/cli/src/main.tsat v0.4.12:scriptc coveragereports the entry fully static, andscriptc buildproduces a working executable.- A source build of v0.4.11 plus #3504, run with
node packages/cli/dist/main.js:scriptc coveragereports 24,873 statements, 100% static.
So the failure seems specific to the natively compiled CLI rather than to the compiler's handling of the program.
Reproducing
The app's sources aren't public yet. I can try to reduce it to a standalone reproduction, or run a build of the CLI with symbols, or with whatever diagnostics would help, if you can point me to one.
- Lingua principale
- TypeScript
- Stelle
- 6.6k
- Fork
- 216
- Merge medio
- 9h 35m
- PR unite (30g)
- 775
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 vercel-labs/scriptc
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel-labs/scriptc#3979 ·
I maintainer di solito rispondono entro 1 giorno
-
Support undici 8.x request() through the built-in implementationForse già presa @younggglcy l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
vercel-labs/scriptc#3894 ·
I maintainer di solito rispondono entro 1 giorno
-
A native program crashes with SIGSEGV when a string or JSON builder grows past 4 MiBForse già presa @alantriesagain l’ha presa 5 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 22/100
vercel-labs/scriptc#3642 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
vercel-labs/scriptc#3613 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
vercel-labs/scriptc#3605 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vercel-labs/scriptc
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
milind-soni/OpenMausBot#6730 ·
I maintainer di solito rispondono entro 1 giorno
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Apertaarea: @angular/build
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
angular/angular-cli#34764 ·
I maintainer di solito rispondono entro 1 giorno
-
status/need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
google-gemini/gemini-cli#30384 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
area:image documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno