Integrated: 8374436: compiler/igvn/IntegerDivValueTests.java failed with division by zero

Tobias Hotz duke at openjdk.org
Wed Jan 7 11:52:54 UTC 2026


On Mon, 5 Jan 2026 18:37:54 GMT, Tobias Hotz <duke at openjdk.org> wrote:

> This PR is a follow-up to https://github.com/openjdk/jdk/pull/26143
> I've missed that INT_CONST_2 and LONG_CONST_2 may be zero depending on the seed, which causes arithmetic exceptions that are not being caught.
> The fix is simple: Detect if these constants are zero, and if so, expect a div by zero exception to be thrown.
> I've not added additional test as this is a testbug, but I verified this test works correctly now if INT_CONST_2 is zero

This pull request has now been integrated.

Changeset: d7a3df63
Author:    Tobias Hotz <tobias.hotz at hotmail.de>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d7a3df639977ac8442eec1efb41de6dc50384150
Stats:     10 lines in 1 file changed: 8 ins; 0 del; 2 mod

8374436: compiler/igvn/IntegerDivValueTests.java failed with division by zero

Reviewed-by: chagedorn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list