JDK-8132344 : stub sizes too small
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-07-24
  • Updated: 2015-12-18
  • Resolved: 2015-12-18
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
9Fixed
Related Reports
Relates :  
Relates :  
Description
As part of JDK-8003853, emit_to_interp_stub sizing was changed from

    start_a_stub(Compile::MAX_stubs_size);

to

    start_a_stub(to_interp_stub_size()*2);

In retrospect, it seems better to use

    start_a_stub(to_interp_stub_size());

and check at the end that the size was big enough, like PPC does:

     assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big");

or make sure a similar check is part of end_a_stub().

We also need to make sure Compile::MAX_stubs_size is big enough.  If we wanted to make sure it was always big enough, we could change it from an enum to a variable, and do:

Compile::MAX_stubs_size = MAX(Compile::MAX_stubs_size, to_interp_stub_size());
Comments
Fixed as part of 8136421 and 8130309.
18-12-2015