8254983: jextract fails to hande layout paths nested structs/union #384
Conversation
|
* Add missing copyright header * Cleanup code
Webrevs
|
@mcimadamore This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 110 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
I reviewed the changes. Also I tested all samples (source and binary mode) on Mac. All jextract and run fine. |
/integrate |
@mcimadamore Since your change was applied there have been 110 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit d841b84. |
This patch fixes an issue with jextract code generation. More specifically, when multiple structs with same name are found in an header (this is possible if the structs are at different level of nesting e.g.
Foo.Bar
vs.Foo.Baz.Bar
), jextract erroneously uses the struct simple name to qualifiy the various fields associated with the struct (such as the layout field). Because of this, there are cases where, when generating a var handle for a struct field, we erroneously pick up the layout corresponding to a different struct, which then causes an error at runtime.The fix is to always disambiguate struct names when in nested context, so that
Foo.Bar
andFoo.Baz.Bar
lead to different constant names.Progress
Testing
Failed test tasks
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/panama-foreign pull/384/head:pull/384
$ git checkout pull/384