RFR: 8329013: StackOverflowError when starting Apache Tomcat with signed jar

Daniel Fuchs dfuchs at openjdk.org
Tue Apr 2 13:44:01 UTC 2024


On Thu, 28 Mar 2024 15:55:12 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

> Calling extra logging calls during initialization of Logger libraries can cause recursion leading to StackOverflowError
> This patch adds logic to the EventHelper class to detect recursion and prevent it.

The code changes LGTM. Some comments on the test.

test/jdk/jdk/security/logging/RecursiveEventHelper.java line 56:

> 54:         // a recursive call (via EventHelper.isLoggingSecurity) back into
> 55:         // logger API
> 56:         EventHelper.isLoggingSecurity();

As an additional check you could set a static volatile boolean to true here and double check that it's been set at the end of the main method,

test/jdk/jdk/security/logging/RecursiveEventHelper.java line 59:

> 57:         return super.getProperty(p);
> 58:     }
> 59: }

add newline?

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

PR Review: https://git.openjdk.org/jdk/pull/18534#pullrequestreview-1973842520
PR Review Comment: https://git.openjdk.org/jdk/pull/18534#discussion_r1547904127
PR Review Comment: https://git.openjdk.org/jdk/pull/18534#discussion_r1547897811


More information about the core-libs-dev mailing list