Request for reviews (S): 6880034 for HS16 and HS17
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Mon Oct 5 17:11:57 PDT 2009
Looks good. Volker, thanks for the fix.
tom
On Oct 5, 2009, at 4:26 PM, Vladimir Kozlov wrote:
>
> http://cr.openjdk.java.net/~kvn/6880034/webrev.01
>
> Fixed 6880034: SIGBUS during deoptimisation at a safepoint on 64bit-
> SPARC
>
> Problem (found and described by Volker Simonis):
> Wrong numbering of the 16 upper double registers in sparc.ad
> maps the invalid half (R_D32x, R_D34x, ..) of the double
> registers F32-F62 to even VMReg numbers (96, 98, ..) and the valid
> part (R_D32, R_D34, ..) to odd VMReg numbers (97, 99, ..). Later on,
> when the locals array for the safepoint is constructed in
> Compile::FillLocArray(), the call to OptoReg::as_VMReg(regnum) for a
> valid, even double register >= F32 (e.g. 96) returns the invalid, odd
> part (e.g. 97). This odd VMReg number is than stored in the Location
> part of the local and leads to the the fact that reg->reg2stack()
> returns odd values for float registers >= F32.
> This finally leads to a BUS error due to an unaligned double read
> when the location of the register is accessed through the reg_map
> during deoptimisation in StackValue::create_stack_value().
>
> Solution:
> Fix the double register encodings in sparc.ad.
> Use FloatRegisterImpl::number_of_registers instead of 64
> in RegisterSaver::save_live_registers() and restore_live_registers().
> Replace if(true) with comments in save_live_registers().
>
> Contributed by: volker.simonis at gmail.com
>
> Reviewed by:
>
> Fix verified (y/n): y, bug's test
>
> Other testing:
> JPRT, CTW
>
More information about the hotspot-compiler-dev
mailing list