On Fri, 27 Mar 2026 14:40:03 GMT, Matthew Donovan <[email protected]> wrote:
>> This PR extends security tests to use ByteBuffers backed by MemorySegments. >> Tests in the areas of Signature, Cipher, MessageDigest, and Mac are updated. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > 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. 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? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r4005025543 PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r4005036599
