Skip to content

bugfixes July-26-2026 - #2207

Merged
SchoolyB merged 14 commits into
mainfrom
bugfixes/july-26-2026
Jul 26, 2026
Merged

bugfixes July-26-2026#2207
SchoolyB merged 14 commits into
mainfrom
bugfixes/july-26-2026

Conversation

@SchoolyB

@SchoolyB SchoolyB commented Jul 26, 2026

Copy link
Copy Markdown
Member

This PR contains the following changes:

Bug Fixes

Security Improvments

Tests

  • Add several new integration tests

SchoolyB added 13 commits July 25, 2026 15:26
…write sites (#2191)

addr(const_var) was rejected at the call site with E3122, but reading
through a pointer to const is safe. Move the check to assignment sites
so writes through the pointer (p^ = v, p^.field = v, p^ += v) are
caught while reads are permitted. Track const origin via a new
const_source flag on Symbol, following the existing is_ref pattern.
…_by_zero

test_e2e_divide_by_zero manually incremented _test_pass/_test_fail
instead of using ASSERT macros, causing RUN_TEST to double-count the
result (100 passed, 0 failed with 99 total). Replace with ASSERT calls
consistent with all other test functions. Also add total line to
integration test runner summary.
…2177)

Unbounded interpolation expressions could cause uncontrolled memory
growth by allocating arbitrarily large strings on the arena. Add a
size check before copying the expression text, emitting E2001 when
the expression exceeds 64KB.
…ll bytes (#2195)

Replace the two-pass gray_string_format approach in NODE_INTERPOLATED_STRING
with chained gray_string_concat calls. gray_string_format uses vsnprintf which
truncates at \0; gray_string_concat uses memcpy with explicit .len and is
null-safe.
…inter dereference (#2164)

Pointer assignment paths (p^, p^.field, p.inner.val, p.field) returned
early with the raw C operator, skipping the overflow-checked compound
assignment block. Add emit_checked_ptr_compound helper that emits
gray_(u)sized_*_check / gray_(u)*_check for +=, -=, *= on integer types
through all four pointer dereference paths.
…fix (#2162)

Replace shallow ad-hoc checks with the existing assignment_target_root_name()
helper so that deeply nested member/index chains (e.g. o.inner.value = 999,
o.inner.value += 10, p.x++) are caught by the typechecker instead of leaking
C compiler errors or silently violating const.
@github-actions github-actions Bot added documentation Improvements or additions to documentation parser Related to parsing and AST construction typechecker Related to type checking and validation module-system Related to imports, exports, and module loading stdlib General standard library issues tests Related to unit tests or test infrastructure error-messages Related to improving error messages cli Command-line interface related grayc Related to the grayscale compiler core or its internal tooling labels Jul 26, 2026
@SchoolyB SchoolyB changed the title fix: July 26 bugfixes batch bugfixes July-26-2026 Jul 26, 2026
@SchoolyB
SchoolyB merged commit d304677 into main Jul 26, 2026
@SchoolyB
SchoolyB deleted the bugfixes/july-26-2026 branch July 26, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Command-line interface related documentation Improvements or additions to documentation error-messages Related to improving error messages grayc Related to the grayscale compiler core or its internal tooling module-system Related to imports, exports, and module loading parser Related to parsing and AST construction stdlib General standard library issues tests Related to unit tests or test infrastructure typechecker Related to type checking and validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant