[foreign-memaccess+abi] RFR: 8287516: Implement fallback Linker [v6]
Jorn Vernee
jvernee at openjdk.org
Fri Jan 20 15:48:09 UTC 2023
On Fri, 20 Jan 2023 15:43:32 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/abi/fallback/FFIType.java line 141:
>>
>>> 139: }
>>> 140: }
>>> 141: expectedOffset += element.byteSize();
>>
>> I think the offset should only be added for structs, not for unions
>
> We can never encounter a union layout in this code. In libffi they are represented as a single element struct.
Support for unions is not implemented in the fallback linker at the moment [1](https://github.com/openjdk/panama-foreign/pull/770/files#diff-b2d5d47f7117501ef2f8d7c497f0e2d999ac4374ae0a17aacaf12590cb2fc111R116). I wanted to do that as part of: https://bugs.openjdk.org/browse/JDK-8300294 when we have some tests, and there might be issues on other linkers as well that need fixing.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/770
More information about the panama-dev
mailing list