review for 7056380: VM crashes with SIGSEGV in compiled code

Tom Rodriguez tom.rodriguez at oracle.com
Mon Jun 20 17:39:32 PDT 2011


http://cr.openjdk.java.net/~never/7056380
55 lines changed: 20 ins; 30 del; 5 mod; 24757 unchg

7056380: VM crashes with SIGSEGV in compiled code
Summary: code was using andq reg, imm instead of addq addr, imm
Reviewed-by:

In the changes for 6961690 a copy of cmpfp_fixup was moved inline but
was translated incorrectly so that it was and'ing rsp instead of
(rsp).  This would cause garbage to be popped into the flags and
corrupt rsp.  Depending on the OS and values involved you would die at
the next of use the flags or later after a return.  The fix is to use
the right andq form.  I also converted the cmpfp_fixup code into
MacroAssembler so that it was obviously equivalent.  Tested with
failing test case and by inspection of the resulting assembly.



More information about the hotspot-compiler-dev mailing list