OpenJDK / jdk / jdk
changeset 54267:75445a7c2c04
8221343: x86_32 crashes on startup with "_hwm out of range"
Reviewed-by: thartmann, kvn
author | redestad |
---|---|
date | Mon, 25 Mar 2019 20:57:07 +0100 |
parents | 7816d989bf21 |
children | 0cf2c87ce79a |
files | src/hotspot/share/opto/matcher.cpp |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/opto/matcher.cpp Mon Mar 25 19:49:32 2019 +0300 +++ b/src/hotspot/share/opto/matcher.cpp Mon Mar 25 20:57:07 2019 +0100 @@ -416,14 +416,20 @@ return rms; } -//---------------------------init_first_stack_mask----------------------------- +#define NOF_STACK_MASKS (3*6+5) + // Create the initial stack mask used by values spilling to the stack. // Disallow any debug info in outgoing argument areas by setting the // initial mask accordingly. void Matcher::init_first_stack_mask() { // Allocate storage for spill masks as masks for the appropriate load type. - RegMask *rms = (RegMask*)C->comp_arena()->Amalloc_D(sizeof(RegMask) * (3*6+5)); + RegMask *rms = (RegMask*)C->comp_arena()->Amalloc_D(sizeof(RegMask) * NOF_STACK_MASKS); + + // Initialize empty placeholder masks into the newly allocated arena + for (int i = 0; i < NOF_STACK_MASKS; i++) { + new (rms + i) RegMask(); + } idealreg2spillmask [Op_RegN] = &rms[0]; idealreg2spillmask [Op_RegI] = &rms[1];