Code Review for 6920293

Prepared by:never on Thu Feb 4 13:44:53 PST 2010
Workspace:/net/smite.sfbay/export/ws/error
Compare against: ssh://hg.openjdk.java.net/jdk7/hotspot-comp-gate/hotspot
Summary of changes: 20 lines changed: 9 ins; 1 del; 10 mod; 7494 unchg
Patch of changes: 6920293.patch
Author comments:
6920293: OptimizeStringConcat causing core dumps
Reviewed-by: kvn, twisti

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.

Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/opto/stringopts.cpp

5 lines changed: 1 ins; 0 del; 4 mod; 1391 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/sharedRuntime.cpp

7 lines changed: 4 ins; 1 del; 2 mod; 2561 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/code/nmethod.cpp

4 lines changed: 3 ins; 0 del; 1 mod; 2677 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp

4 lines changed: 1 ins; 0 del; 3 mod; 865 unchg

This code review page was prepared using /never/bin/webrev (vers 23.18-hg-never).