Skip to content

jextract jni/ffm modes alignment: make FFM wrapper func throw if integer overflow would happen #517

Description

@ktoso

Follow up to #460 which did this in JNI mode, but now the FFM mode does not do this so we have inconcistency between the modes.

We should probably move the check into Java BEFORE doing the downcall, rather than throwing from the swift thunk -- then the code can be shared betweeh the two modes.

Activity

  1. ktoso commented on Jan 8, 2026

    @ktoso
    CollaboratorAuthor

    FYI @pelekon if you'd be up for this follow up

  2. DPrakashhh commented on Jan 27, 2026

    @DPrakashhh
    Contributor

    Hi @ktoso! I'm really interested in this issue as a way to start contributing to the project. Full disclosure: I'm currently a Java beginner, but I'm eager to learn by doing.

    I've looked at the description and I understand the goal is to move the overflow checks from the native side to the Java side for FFM consistency. If you're open to it, I'd love to try and tackle this—I'll likely need a little guidance on where the specific Java-side generation logic lives, but I'm happy to put in the work to figure it out.

    Is it okay if I give this a shot?

  3. pelekon commented on Jan 27, 2026

    @pelekon
    Contributor

    I am fine with that, I am using all scraps of my free time for topics from last meeting, so I don't have this issue on my list rn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:jextractIssues related to jextract-swift

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions