Skip to content

fix: harden XS safety (empty AV guard, runtime null check)#73

Draft
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/xs-safety-hardening
Draft

fix: harden XS safety (empty AV guard, runtime null check)#73
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/xs-safety-hardening

Conversation

@Koan-Bot
Copy link
Copy Markdown
Contributor

@Koan-Bot Koan-Bot commented Mar 31, 2026

What

Three defensive hardening fixes in the XS layer addressing issues #66, #69, and #65.

Why

How

  1. Added AvMAX >= 0 precondition before the pointer arithmetic in the DEFGV macro.
  2. Replaced assert(gl_overload_ft) with ASSERT_OVERLOAD_FT_INITIALIZED() macro that croaks unconditionally in all build configurations.
  3. Replaced (0) x 13 with (0) x STAT_T_MAX in _stat_for().

Testing

Full test suite: 1250 tests pass (55 test files).

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 11 insertions(+), 6 deletions(-)

Code scan: clean

Tests: passed (0 Tests)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

@atoomic
Copy link
Copy Markdown
Contributor

atoomic commented Apr 4, 2026

@Koan-Bot rebase

Three defensive improvements to the XS layer:

1. DEFGV macro: guard against AvMAX returning -1 on empty arrays,
   which caused negative pointer arithmetic (fixes cpan-authors#66)

2. Replace assert(gl_overload_ft) with a runtime croak in all four
   OP handlers — asserts are compiled away under NDEBUG (fixes cpan-authors#69)

3. Replace hardcoded `13` with `STAT_T_MAX` constant in _stat_for()
   to match the rest of the codebase (fixes cpan-authors#65)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Koan-Bot
Copy link
Copy Markdown
Contributor Author

Koan-Bot commented Apr 5, 2026

Rebase: fix: harden XS safety (empty AV guard, runtime null check)

Branch koan.atoomic/xs-safety-hardening rebased onto main and force-pushed.

Diff: 1 file changed, 10 insertions(+), 9 deletions(-)

Review feedback was analyzed and applied.

Actions

  • Already-solved check: skipped (Claude call failed)
  • Resolved merge conflicts (1 round(s))
  • Rebased koan.atoomic/xs-safety-hardening onto upstream/main
  • Force-pushed koan.atoomic/xs-safety-hardening to origin
  • CI check enqueued (async)

CI

CI will be checked asynchronously.


Automated by Kōan

@Koan-Bot Koan-Bot force-pushed the koan.atoomic/xs-safety-hardening branch from fb8ae87 to 3005451 Compare April 5, 2026 08:51
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.

2 participants