Skip to content

JFF crashes VM on invokeN0 on i386 and on armhf alltogether #137

Open
@aploese

Description

@aploese

On an Linux i386 Openjdk-19 this code crashes the VM on invokeN0
On Linux armhf Openjdk-11 and Openjdk-19 even invokeI0 crashes.

    public static void main(String[] args) {
        final CallContext CC = new CallContext(Type.SINT32, Type.VOID);
        final Library LIB = Library.getDefault();
        long address = LIB.getSymbolAddress("getpid");

        System.out.println("JFFI Test call getpid() via invokeI0: ");

        int result = (int) Invoker.getInstance().invokeI0(
                CC,
                address);

        System.out.println("JFFI Test -> getpid (invokeI0): " + result);

        System.out.println("JFFI Test call getpid() via invokeN0: ");

        result = (int) Invoker.getInstance().invokeN0(
                CC,
                address);

        System.out.println("JFFI Test -> getpid (invokeN0): " + result);

        System.out.println("JFFI Test call getpid() via invokeL0: ");

        result = (int) Invoker.getInstance().invokeL0(
                CC,
                address);

        System.out.println("JFFI Test -> getpid (invokeL0): " + result);
    }

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions