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

DirectArgumentsMarshalNullableTest failure for s390x #1103

Closed
nealef opened this issue Jun 5, 2019 · 5 comments
Closed

DirectArgumentsMarshalNullableTest failure for s390x #1103

nealef opened this issue Jun 5, 2019 · 5 comments

Comments

@nealef
Copy link

nealef commented Jun 5, 2019

  1. Version of JNA and related jars
    • From git master
  2. Version and vendor of the java virtual machine
    • openJDK 11 (Eclipse openJ9)
  3. Operating system
    • Linux
  4. System architecture (CPU type, bitness of the JVM):
    • s390x (64-bit, big endian)
  5. 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)
  1. Steps to reproduce
  • Build using ant 1.10.6

I inserted some debug code into DirectArgumentsMarshalNullableTest and into native/testlib.c to see what was being processed:

  1. 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
  1. 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.

@matthiasblaesing
Copy link
Member

Could you do a bisect to see when this problem was introduced? I build the library in a qemu-chroot but the speed is only enough for that. If you can run it on real hardware, this should speed up bisecting considerably. Thank you.

@nealef
Copy link
Author

nealef commented Jun 5, 2019 via email

@matthiasblaesing
Copy link
Member

matthiasblaesing commented Jun 5, 2019 via email

@nealef
Copy link
Author

nealef commented Jun 5, 2019 via email

@matthiasblaesing
Copy link
Member

The fix for the issue was merged to master. The problem was not in the unittest, but a real problem in the direct dispatch code path.

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

2 participants