You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be able to reproduce this reliably on my end, could you please provide a more complete reproducer with all the code you used? You could also share all the code in a github repository alongside the steps/commands needed to reproduce the issue you're encountering.
This will help speed up the process on our end. Thank you.
Thank you for sharing the reproducer. I was able to reproduce the issue on my end. We will take a closer look into this and I'll make sure to keep you updated.
Uh oh!
There was an error while loading. Please reload this page.
Describe the Issue
When i pass a struct to c function @cstruct annotated interface it's values are garbage
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
java version "24" 2025-03-18
Java(TM) SE Runtime Environment Oracle GraalVM 24+36.1 (build 24+36-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 24+36.1 (build 24+36-jvmci-b01, mixed mode, sharing)
Operating System and Version
Linux fedora 6.14.3-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Apr 20 16:08:39 UTC 2025 x86_64 GNU/Linux
Troubleshooting Confirmation
Run Command
native-image -cp . -H:CLibraryPath=$(pwd) -H:IncludeResources=add.h --native-compiler-options="-I$(pwd)" -Ob -jar Main.jar
Expected Behavior
5
Age: 5
Actual Behavior
5
Age: -678812048
Steps to Reproduce
1.create a c function which takes a struct as param
2. pass the struct obj from java
3. print the properties in c and java
Additional Context
java code:
C code:
Run-Time Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: