RFR: 8314263: Signed jars triggering Logger finder recursion and StackOverflowError [v5]

Daniel Fuchs dfuchs at openjdk.org
Mon Aug 28 19:07:10 UTC 2023


On Mon, 28 Aug 2023 18:49:40 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Sean Coffey has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix up test cases
>
> test/jdk/java/lang/System/LoggerFinder/RecursiveLoading/PlatformRecursiveLoadingTest.java line 64:
> 
>> 62:         logs.stream().map(SimpleLogRecord::of).forEach(System.out::println);
>> 63:         logs.stream().map(SimpleLogRecord::of).forEach(SimpleLogRecord::check);
>> 64:         assertEquals(String.valueOf(logs.size()), String.valueOf(2));
> 
> Suggestion:
> 
>         assertEquals(String.valueOf(logs.size()), String.valueOf(3));
> 
> See suggestions to SimpleLoggerFinder below...

Creating a logger from within the SimpleLoggerFinder constructor ensures that we get the expected StackOverFlow when the patch is not present. I believe it's a better emulation for the issue that was detected with signed jars, where a logger was created while loading the provider.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15404#discussion_r1307798105


More information about the core-libs-dev mailing list