-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Simon B.Stirling edited this page Mar 2, 2026
·
1 revision
I use this as my deterministic troubleshooting reference.
- Run
./bin/l0c verify <file.l0>. - If verify fails, classify by error class in
docs/ERROR_MODEL.md. - If verify passes but runtime surprises happen, inspect
imgmeta,mapcat,tracecat, andtracejoin.
Symptom:
error: invalid module shape or non-canonical input
Checks:
- section order is exact
- function ids contiguous (
f0..) - block ids contiguous (
b0..) - one terminator per block
- value lines include
: tN
Fix path:
- compare with
docs/HOW_TO_WRITE_L0.md - minimize failing file and re-verify
Symptom:
- verifier returns parse/non-canonical class on otherwise structured file
Checks:
- every
vNused byret/cbr/call/binary/memory/intrinsicwas defined earlier in function
Fix path:
- move definitions before use
- keep SSA single definition per
vN
Symptoms:
- verifier failure on
ld/st/gep/alloca/malloc/free/write
Checks:
- pointer operands use
p0<i8>paths in current bootstrap contract - non-pointer operands where required (
malloc size,write len,exit code)
Fix path:
- align with typing rules in
docs/GRAMMAR_AND_TYPING.md
Symptom:
error: invalid or corrupt L0IMG
Checks:
- run
./bin/l0c imgcheck <img>first - rebuild image from source with
build
Fix path:
- avoid editing binary payloads manually
- regenerate debug-map/schema side artifacts with
build --debug-map --trace-schema
Symptom:
error: invalid run argument (expected unsigned decimal)
Fix path:
- pass decimal unsigned integer args only
- avoid signs, hex, or non-numeric tokens
Use this sequence:
./bin/l0c build <file.l0> /tmp/x.img --debug-map /tmp/x.map --trace-schema /tmp/x.schema
./bin/l0c run /tmp/x.img <args...> >/tmp/x.out 2>/tmp/x.trace
./bin/l0c imgmeta /tmp/x.img
./bin/l0c mapcat /tmp/x.map
./bin/l0c tracecat /tmp/x.trace
./bin/l0c tracejoin /tmp/x.trace /tmp/x.mapInterpretation:
-
imgmetatells me kernel selection and code size -
mapcattells me instruction id ranges -
tracecatgives raw trace values -
tracejoinmaps trace ids to code ranges
- How-To-Write-L0
- Language-Reference
- Instruction-Set
- CLI-and-Compiler-Spec
- Implementable-Spec
- Command-Reference
- Examples-Catalog
- LLM-Quick-Reference
- Opcode-Examples
- LLM-Doc-Index