ludic/selfhost/backend
Orkuncakilkaya 0998cb5a18 feat(compiler): a slice index is checked against its length
A slice has carried { ptr, len, cap } since it existed and nothing ever read
the len: every index emitted a bare getelementptr. Running off the end of one
wrote into whatever the allocator had put next, and the program died somewhere
else entirely - a maroon-lake crash took a day to find because the stack named
a texture upload and the write was in a telemetry buffer five frames earlier.

Now each index loads the length and compares unsigned, which rejects a negative
index in the same instruction, and a failure aborts with the location the other
located errors use:

    oob.ludic:9: index out of range: 7, len 3

`words` and the other raw buffers are unchanged - they are a bare malloc with no
length to check, which is the argument for moving off them.

The SPIR-V variants are regenerated in the same commit: shaders --check was
failing against the edited GLSL.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 20:54:12 +03:00
..
game feat(lang): float and double types with ordinary operators 2026-09-16 16:13:31 +03:00
stdlib feat: every key on the keyboard is bindable - the F-row, the six-pack, Caps Lock and the numpad 2026-09-18 00:57:02 +03:00
emit_addr.ludic feat(compiler): a slice index is checked against its length 2026-09-22 20:54:12 +03:00
emit_call.ludic feat(launcher): Process.*, Http.save_to/received/expected, App.window_hide/show 2026-09-17 13:32:23 +03:00
emit_core.ludic feat(compiler): a slice index is checked against its length 2026-09-22 20:54:12 +03:00
emit_decl.ludic feat(compiler): a slice index is checked against its length 2026-09-22 20:54:12 +03:00
emit_expr.ludic fix(compiler): == / != on references is identity; only text compares by content 2026-09-16 16:13:31 +03:00
emit_float.ludic feat(lang): float and double types with ordinary operators 2026-09-16 16:13:31 +03:00
emit_head.ludic fix: CSPRNG on Windows, and a window's first title is the package's app name 2026-09-17 16:22:05 +03:00
emit_intrin.ludic feat(windows): a Windows target for ludicc, and the compiler builds itself there 2026-09-13 01:59:41 +03:00
emit_intrin2.ludic fix(input): keys are physical positions on every layout; Input.key_label names them 2026-09-15 23:26:53 +03:00
emit_mem.ludic refactor(selfhost): reorganise into concern-based subdirectories 2026-08-31 00:26:02 +03:00
emit_new.ludic feat(lang): float and double types with ordinary operators 2026-09-16 16:13:31 +03:00
emit_stmt.ludic feat(lang): float and double types with ordinary operators 2026-09-16 16:13:31 +03:00