Skip to content

fix: handle math.abs int64 minimum overflow - #82

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/math-abs-int64-min
Open

fix: handle math.abs int64 minimum overflow#82
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/math-abs-int64-min

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make integer math.abs use checked arithmetic so int64.MIN returns a structured runtime error instead of panicking the runtime thread
  • add unit and end-to-end runtime-failure regressions for the boundary value

Verification

  • cargo build — passed
  • cargo test -q — passed, including 433 driver fixtures
  • cargo fmt --check — passed
  • cargo run -q -p jett_cli -- format --check tests/runtime_fail/math_abs_int64_min.jett — passed
  • git diff --check — passed

Risk

  • Low: the behavior changes only for the single integer value whose absolute value cannot be represented by int64; existing integer and float paths remain covered.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

vycdev commented Aug 10, 2026

Copy link
Copy Markdown
Owner

The math.abs(INT64_MIN) fix is correct in isolation and its focused tests passed, but this branch now conflicts with current main, particularly the merged runtime-failure fixture area from #85. Please rebase and preserve both overflow regressions, then rerun the comptime/driver tests.

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