- Version of JNA and related jars
- Version and vendor of the java virtual machine
- openJDK 11 (Eclipse openJ9)
- Operating system
- System architecture (CPU type, bitness of the JVM):
- s390x (64-bit, big endian)
- Complete description of the problem
- DirectArgumentsMarshalNullableTest test fails:
[junit] Testcase: testIntegerType(com.sun.jna.DirectArgumentsMarshalNullableTest): FAILED
[junit] Basic non-null call expected:<42> but was:<0>
[junit] junit.framework.AssertionFailedError: Basic non-null call expected:<42> but was:<0>
[junit] at com.sun.jna.ArgumentsMarshalNullableTest.testIntegerType(ArgumentsMarshalNullableTest.java:214)
[junit] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- Steps to reproduce
I inserted some debug code into DirectArgumentsMarshalNullableTest and into native/testlib.c to see what was being processed:
- Value of Int32.fromNative/toNative -
[junit] from: com.sun.jna.ArgumentsMarshalNullableTest$Int32$1@7567860b
[junit] to: com.sun.jna.ArgumentsMarshalNullableTest$Int32$2@ae757b28
[junit] from: com.sun.jna.ArgumentsMarshalNullableTest$Int32$1@7567860b
[junit] from: com.sun.jna.ArgumentsMarshalNullableTest$Int32$1@7567860b
[junit] to: com.sun.jna.ArgumentsMarshalNullableTest$Int32$2@ae757b28
[junit] to: com.sun.jna.ArgumentsMarshalNullableTest$Int32$2@ae757b28
- Value of arg in
returnInt32Argument
[junit] int32arg: 0000002a
[junit] int32arg: 00000000
[junit] int32arg: 00000000
[junit] int32arg: 0000002a
[junit] int32arg: 00000000
Note: All other tests pass.
I inserted some debug code into
DirectArgumentsMarshalNullableTestand intonative/testlib.cto see what was being processed:returnInt32ArgumentNote: All other tests pass.