On Mon, 14 Sep 2026 12:18:08 GMT, Weijun Wang <[email protected]> wrote:
>> Matthew Donovan has updated the pull request with a new target base due to a
>> merge or a rebase. The pull request now contains 10 commits:
>>
>> - Merge branch 'master' into cipher-ffm
>> - Merge branch 'master' into cipher-ffm
>> - Merge branch 'master' into cipher-ffm
>> - Merge branch 'master' into cipher-ffm
>> - updated additional Cipher tests for MemorySegment-backed ByteBuffers
>> - Merge branch 'master' into cipher-ffm
>> - added null-check for arena argument
>> - addressed PR comments and refactored to use try-with-resources
>> - Merge branch 'master' into cipher-ffm
>> - 8357466: Create test for Ciphers that are using ByteBuffers backed by
>> MemorySegments
>
> test/jdk/com/sun/crypto/provider/Cipher/AEAD/GCMShortInput.java line 56:
>
>> 54: try (Arena arena = Arena.ofConfined()) {
>> 55: cipher.doFinal(arena.allocate(0).asByteBuffer(),
>> arena.allocate(0).asByteBuffer());
>> 56: }
>
> If line 53 has successfully thrown the expected ABTE, there is no chance to
> run the new test case.
Fixed so both test cases execute
> test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java line 138:
>
>> 136: ByteBuffer outDirectBuf = ByteBuffer.allocateDirect(outLen);
>> 137: ByteBuffer inMemBuf =
>> arena.allocate(in.length).asByteBuffer();
>> 138: ByteBuffer outMemBuf =
>> arena.allocate(outLen).asByteBuffer();
>
> Do you mean to use these 2 new buffers?
I did mean to use them. I updated the test to include them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r4260688495
PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r4260692166