jextract: implement Java-side integer overflow checks for FFM (#517)#549
Merged
ktoso merged 5 commits intoswiftlang:mainfrom Mar 18, 2026
Merged
Conversation
Contributor
Author
|
I’ve refined the overflow logic to distinguish between signed |
Collaborator
|
Hi there, sorry that I was slow to respond here in February -- coming back to this now, I'll see to the conflicts and review the change. |
…efactor duplication - Add String message constructor to SwiftIntegerOverflowException (fixes compilation error) - Rename swiftArena$ to swiftArena to match main branch convention - Extract printReturnWithOverflowCheck helper to reduce code duplication
03b1440 to
d9f4916
Compare
Collaborator
|
LGTM, thank you! Sorry again reviewing took me a while, now being more responsive -- if you'd like to tackle something else! Edits: Just adjusted code a little bit around the printing, so that we don't have that much repeated print() around. |
ktoso
approved these changes
Mar 18, 2026
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 PR implements integer overflow checks for FFM mode (Issue #517). I have performed a hard reset to ensure a surgical implementation with zero unrelated formatting changes, addressing your previous feedback.
Key Updates:
1-Architectural Alignment: Added
SwiftValueLayout.has32bitSwiftIntto gate architecture-specific checks, matching the project's JNI patterns.Verified: All 207 tests passed successfully.
Supersedes PR #546.
@ktoso — Please don't worry about this until you're feeling better. Wishing you a speedy recovery! :)