RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v10]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Nov 2 10:34:18 UTC 2021


On Tue, 2 Nov 2021 00:24:12 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
>> 
>>  - Add cache for memory address var handles
>>  - Merge branch 'master' into JEP-419
>>  - Fix regression in VaList treatment on AArch64 (contributed by @nick-arm)
>>  - Merge branch 'master' into JEP-419
>>  - Fix copyright header in TestArrayCopy
>>  - Fix failing microbenchmarks. Contributed by @FrauBoes (thanks!)
>>  - * use `invokeWithArguments` to simplify new test
>>  - Add test for liveness check with high-aririty downcalls
>>    (make sure that if an exception occurs in a downcall because of liveness,
>>    ref count of other resources are left intact).
>>  - * Fix javadoc issue in VaList
>>    * Fix bug in concurrent logic for shared scope acquire
>>  - Address review comments
>>  - ... and 7 more: https://git.openjdk.java.net/jdk/compare/5bb1992b...9b519343
>
> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/Utils.java line 111:
> 
>> 109:         class VarHandleCache {
>> 110:             private static final Map<ValueLayout, VarHandle> handleMap = new ConcurrentHashMap<>();
>> 111:             private static final Map<ValueLayout, VarHandle> handleMapNoAlignCheck = new ConcurrentHashMap<>();
> 
> Something to consider later if this is an issue. Since the number of `ValueLayout` instances is fixed, carrier x order = 18, we can use stable arrays with ordinals on the instances.

What about alignment?

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

PR: https://git.openjdk.java.net/jdk/pull/5907


More information about the security-dev mailing list