RFR(XS): 8221482: Initialize VMRegImpl::regName[] earlier to prevent assert during PrintStubCode

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Mar 29 18:53:28 UTC 2019

On 3/28/19 8:59 PM, David Holmes wrote:
> Hi Lutz,
> cc'd the compiler team
> On 28/03/2019 9:14 pm, Schmidt, Lutz wrote:
>> Dear Community,
>> may I please request reviews for this tiny change. The purpose is to initialize the regName[] 
>> array earlier during VM init.
> I can see that will fix the assertion for you, but then begs the question as to whether 
> VMRegImpl::set_regName itself has any initialization dependencies. The answer to that is not obvious 
> to me. I _think_ the Register setup only depends on C++ static initialization.
> Hopefully someone from compiler team can confirm this change is in fact safe.

The array is static:


And register's names are encoded:


There are no initialization dependencies.


> Thanks,
> David
>> Bug:    https://bugs.openjdk.java.net/browse/JDK-8221482
>> Webrev: http://cr.openjdk.java.net/~lucy/webrevs/8221482.01/
>> Submit-repo tests pending...
>> Thanks,
>> Lutz

More information about the hotspot-compiler-dev mailing list