RFR: 8324657: Intermittent OOME on exception message create

Iris Clark iris at openjdk.org
Wed Jan 24 21:43:26 UTC 2024


On Mon, 22 Jan 2024 20:52:32 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> When an exception handler for an OutOfMemoryError uses string concatenation to compose an exception message, the invoke dynamic string format implementation may itself exhaust memory, preventing the exception from being handled.
> Explicit use of String.concat() call can improve exception handling.
> 
> Writing a test of the exact failure condition has proved challenging due to the unpredictable state of memory when OOME occurs. The replacement of "+" with String.concat() is simple and direct.

Marked as reviewed by iris (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/17522#pullrequestreview-1842436256


More information about the core-libs-dev mailing list