[foreign-memaccess+abi] RFR: 8303017: Passing by-value structs whose size is not power of 2 doesn't work on all platforms [v2]

Jorn Vernee jvernee at openjdk.org
Thu Mar 2 17:40:23 UTC 2023


On Wed, 1 Mar 2023 17:55:23 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>> 
>>  - beef up test
>>  - Merge branch 'foreign-memaccess+abi' into OOB
>>  - review comments
>>  - move pickChunkOffset to SharedUtils
>>  - eyeball BE support
>>  - forgot bufferStore for AArch64
>>  - add check + fix aarch64
>>  - polish
>>  - polish test
>>  - chunked in specializer
>>  - ... and 2 more: https://git.openjdk.org/panama-foreign/compare/a7df48c8...84be4370
>
> src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 591:
> 
>> 589:                 // non-exact match, need to do chunked load
>> 590:                 long longValue = ((Number) value).longValue();
>> 591:                 int remaining = byteWidth();
> 
> There is a strong assumption here that byteWidth() is always < 8. Perhaps add a comment.

Done. I also added the missing check to the `bufferStore` factory.

-------------

PR: https://git.openjdk.org/panama-foreign/pull/806


More information about the panama-dev mailing list