Skip to content

docs: JIT cache crash on runs that compile two or more modules (native_ts_graphics finding 7) - #548

Merged
ASDAlexander77 merged 1 commit into
mainfrom
docs/ntg-jit-cache-crash
Oct 11, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
docs/ntg-jit-cache-crash

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Adds issue 7 to docs/bugs/native-ts-graphics-findings.md, with a two-file repro: ntg_jit_cache_import.ts, which imports ntg_jit_cache_import_lib.ts.

Build: tslang version v0.0-pre-alpha93 (2026-10-11), the first build with the JIT cache on by default.

Repro:

tslang --emit=jit docs/bugs/ntg_jit_cache_import.ts

Run from an empty cache: delete docs/bugs/__jit first.

Observed: an access violation (0xC0000005) inside tslang.exe before the program runs.

  • Only the importing file's object gets cached.
  • The next run loads it, compiles only the imported file, and prints 42.
  • In general, a run that has to compile two or more modules crashes after writing the first one. Each crashing run caches one more module, so a program of N modules runs on the N-th attempt.
  • With --jit-cache=false every run works.

Expected: 42 on the first run.

Impact: every native_ts_graphics example imports core/input_pass.ts, which imports core/donut.ts. So every example crashed twice under the JIT before it ran. Its run_jit.bat now passes --jit-cache=false (ASDAlexander77/native_ts_graphics#34).

🤖 Generated with Claude Code

…e_ts_graphics finding 7)

pre-alpha93's JIT cache (on by default) crashes with 0xC0000005 in a run
that has to compile two or more modules, after writing the first one's
object; each crashing run caches one more module, so a program of N
modules runs on the N-th attempt. --jit-cache=false works. Repro:
docs/bugs/ntg_jit_cache_import.ts (importing ntg_jit_cache_import_lib.ts),
run without --jit-cache=false from an empty cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant