Box unboxed-rep values reaching value targets at more use-sites#2943
Merged
Conversation
Unboxable primitives (u64/int/float) are now carried unboxed; each use-site that needs a boxed `value` must insert the `Box`. That insertion existed for fixarg/fixreturn/boxValueExpr but was missing elsewhere, so a raw int reached a boxed slot and the first virtual access dereferenced it, causing a runtime crash. Boxing.hs: - fixassign: box a raw unboxed-rep RHS into a value/?value target. - Cond: box then/else branches when the join type is not unboxable. - IsInstance: box the operand ($ISINSTANCE derefs $class). - BinOp And/Or: box both operands ($AND/$OR call __bool__ on them). - exprUnboxedRep: treat a processed And/Or as already boxed, else a fallback re-boxes it (toB_u64(B_u64), a compile error).
One self-contained regression_auto program per fixed use-site; each exits 0 on success and crashes (misaligned address) on the unfixed compiler: - 179 fixassign: unboxed local/global -> value/?value field - 180 Cond: unboxed branch of a conditional with non-unboxable join - 181 BinOp And/Or: unboxed operand (also the value-argument / no-double-box path) - 182 IsInstance: unboxed operand of isinstance
Collaborator
Author
|
@sydow can you please take a look? I also included regression programs that crash on main. |
Collaborator
|
Good morning Marko,
did you get a review? I thought I submitted one but now I see no signs of it on the PR page at GitHub. I hate git…
Anyhow, the short form is: go ahead and merge!
Björn
… On 18 Jun 2026, at 07:24, Marko Zagožen ***@***.***> wrote:
mzagozen left a comment (actonlang/acton#2943)
@sydow can you please take a look? I also included regression programs that crash on main.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This closes #2942. The initial fix was only limited to the crash I found in one of the applications:
But then my robot continued the search and came up with more edge cases