On Tue, 30 Sep 2025 20:00:09 GMT, Chen Liang <[email protected]> wrote:

>> Xueming Shen has refreshed the contents of this pull request, and previous 
>> commits have been removed. The incremental views will show differences 
>> compared to the previous content of the PR. The pull request contains one 
>> new commit since the last revision:
>> 
>>   8365588: defineClass that accepts a ByteBuffer does not work as expected
>
> src/java.base/share/classes/java/lang/ClassLoader.java line 1069:
> 
>> 1067:             try (var arena = Arena.ofConfined()) {
>> 1068:                 ByteBuffer bb = arena.allocate(len).asByteBuffer();
>> 1069:                 bb.put(0, b, b.position(), len);
> 
> Do we need to acquire/release session on the base buffer too?

Good question but no, this buffer comes from a thread confined arena so it 
can't be closed asynchronously.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27569#discussion_r2399261537

Reply via email to