Integrated: 8324657: Intermittent OOME on exception message create

Roger Riggs rriggs at openjdk.org
Thu Jan 25 14:54:57 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.

This pull request has now been integrated.

Changeset: ffe3bb67
Author:    Roger Riggs <rriggs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ffe3bb67632eeec4b5df4e832d9bd5e78c3f808a
Stats:     15 lines in 1 file changed: 8 ins; 2 del; 5 mod

8324657: Intermittent OOME on exception message create

Reviewed-by: lancea, iris, naoto

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

PR: https://git.openjdk.org/jdk/pull/17522


More information about the core-libs-dev mailing list