JDK-8273933 : [TESTBUG] Test must run without preallocated exceptions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-17
  • Updated: 2022-01-21
  • Resolved: 2021-09-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 18
11.0.15-oracleFixed 17.0.3-oracleFixed 18 b16Fixed
Related Reports
Relates :  
Description
Executing vmTestbase/jit/t/t105/t105.java with the fix for (JDK-8273277) makes the test fail when run with the following arguments:

-XX:+TieredCompilation
-XX:Tier0BackedgeNotifyFreqLog=0
-XX:Tier2BackedgeNotifyFreqLog=0
-XX:Tier3BackedgeNotifyFreqLog=0
-XX:Tier2BackEdgeThreshold=1
-XX:Tier3BackEdgeThreshold=1
-XX:Tier4BackEdgeThreshold=1
-Xbatch

The problem is that the tests expects a detailed message from ArrayIndexOutOfBoundsException, but this test will trigger the optimization that reuses preallocated exceptions that have an empty detailed exceptions. 

It is wrong for the test to assume exceptions messages. 

Solution Disable preallocated exceptions with the flag -XX:-ProfileTraps.




Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/783 Date: 2022-01-19 20:43:31 +0000
19-01-2022

Fix request [11u] I backport this for parity with 11.0.15-oracle. No risk, only a test change. Clean backport. Test passes.
19-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/57 Date: 2022-01-04 15:48:53 +0000
04-01-2022

Fix request [17u] I backport this for parity with 11.0.15-oracle. As it is in 11, it should go to 17, too. No risk, only a test change. Clean backport. Test passes.
04-01-2022

Changeset: 4d95a5d6 Author: Nils Eliasson <neliasso@openjdk.org> Date: 2021-09-20 14:59:44 +0000 URL: https://git.openjdk.java.net/jdk/commit/4d95a5d6dc7cc3d2b239c554a1302ac647807bd6
20-09-2021

ILW = Test failure with backedge flags, single test, use -XX:-ProfileTraps = MLM = P4
17-09-2021