Skip to content

Keep Newton division divisor alive - #548

Open
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/keep-newton-divisor-alive
Open

Keep Newton division divisor alive#548
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/keep-newton-divisor-alive

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary:

  • correct the second duplicated RB_GC_GUARD for a2 to guard b2
  • retain the divisor wrapper through the end of VpDivdNewtonInner

Why:
The method constructs a2, b2, c2 and r2, but its final guards name a2 twice and omit b2. The duplicate is a maintenance/liveness typo at a native GC boundary.

Verification:

  • full current suite: 266 tests, 13,616 assertions, 0 failures/errors/omissions
  • RBS suite: 146 tests, 1,805 assertions, 0 failures/errors
  • 25 GC.stress division comparisons pass before and after the correction

Compatibility:
No arithmetic behavior changes. This makes the existing lifetime intent explicit; the stress model did not reproduce a user-visible crash on the tested runtime.

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.

1 participant