JDK-8140574 : C2 must re-execute checks after deoptimizing from merged uncommon traps
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-10-27
  • Updated: 2017-08-07
  • Resolved: 2015-11-06
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 9
9 b96Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
C2 merges the branches that trap for an If and the dominating If into a single region that branches to the uncommon trap for the dominating If. The problem is that if the dominating If branches to an uncommon trap with 'Reason_unloaded', the merged uncommon trap will not re-execute the checks but directly execute the branch of the first If. This leads to wrong code being executed. Since we don't know which of the two checks failed, we have to re-execute both.
Comments
Fix verified by regression test.
07-08-2017

ILW = Wrong code being executed, Reproduces 100% with regression test, no workaround = HHH = P1
27-10-2015