Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aploese opened this issue Dec 21, 2022 · 0 comments
Open

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

aploese opened this issue Dec 21, 2022 · 0 comments

Comments

@aploese
Copy link

aploese commented Dec 21, 2022

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);
    }
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

No branches or pull requests

1 participant