review (S) for 6920293: OptimizeStringConcat causing core dumps

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Wed Feb 3 13:41:17 PST 2010

6920293: OptimizeStringConcat causing core dumps

The code for the idiom a == null ? "null" : a) in OptimizeStringConcat
was putting an explicit NOTNULL on the result Phi which allowed the
optimizer to move some loads above the null check which caused a
crash.  The fix is to use the same idiom the parser uses which is to
cast the resulting value to be notnull and leave the phi type alone.
Tested with failing test from report.  I also made some changes to
error reporting to make the crash output more useful.  Currently if we
don't find an implicit exception handler we die inside the VM and
don't print out much useful information.  Instead we should simply
return null and let the VMError machinery produce a normal crash dump.
I also fixed the formatting for the register in 64 bit mode on solaris
to match the linux formatting.


More information about the hotspot-compiler-dev mailing list