JDK-6754146 : 1.5.0_15 C2 compiler crashes in PhaseChaitin::Split()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0u15,5.0u17,5.0u19
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9,solaris_10
  • CPU: x86,sparc
  • Submitted: 2008-09-30
  • Updated: 2011-02-16
  • Resolved: 2009-03-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
5.0u18-rev b03Fixed 5.0u19Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
C2 compiler of 1.5.0_15 crashed (SEGV) in PhaseChaitin::Split():

Stack: [0x41d00000,0x41d80000),  sp=0x41d7e538,  free space=505k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x207de8] unsigned PhaseChaitin::Split(unsigned)+0x3410
V [libjvm.so+0x213b20] void PhaseChaitin::Register_Allocate()+0x728
V [libjvm.so+0x217b1c] void Compile::Code_Gen()+0x2b8
V [libjvm.so+0x27fd70] Compile::Compile(ciEnv*,C2Compiler*,ciMethod*,int,int)+0xbf4
V [libjvm.so+0x275e30] void C2Compiler::compile_method(ciEnv*,ciMethod*,int)+0xb8
V [libjvm.so+0x2769e0] void CompileBroker::invoke_compiler_on_method(CompileTask*)+0x4d4
V [libjvm.so+0x333354] void CompileBroker::compiler_thread_loop()+0x454
V [libjvm.so+0x2dbad8] void JavaThread::run()+0x2b8
V [libjvm.so+0x67d808] void*_start(void*)+0x210

Comments
SUGGESTED FIX *** src/share/vm/opto/parse1.cpp- Tue Jun 16 21:09:31 2009 --- src/share/vm/opto/parse1.cpp Tue Jun 30 11:20:14 2009 *************** *** 1,10 **** #ifdef USE_PRAGMA_IDENT_SRC ! #pragma ident "@(#)parse1.cpp 1.462 08/08/24 03:58:23 JVM" #endif /* ! * @(#)parse1.cpp 1.462 08/08/24 * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ --- 1,10 ---- #ifdef USE_PRAGMA_IDENT_SRC ! #pragma ident "@(#)parse1.cpp 1.463 09/06/10 23:15:07 JVM" #endif /* ! * @(#)parse1.cpp 1.463 09/06/10 * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ *************** *** 246,256 **** if (!live_oops.at(index)) { if (C->log() != NULL) { C->log()->elem("OSR_mismatch local_index='%d'",index); } ! set_local(index, top()); // and ignore it for the loads continue; } } --- 246,256 ---- if (!live_oops.at(index)) { if (C->log() != NULL) { C->log()->elem("OSR_mismatch local_index='%d'",index); } ! set_local(index, null()); // and ignore it for the loads continue; } } *************** *** 287,296 **** --- 287,302 ---- for (index = 0; index < max_locals; index++) { if (stopped()) break; Node* l = local(index); if (l->is_top()) continue; // nothing here const Type *type = osr_block->local_type_at(index); + if (type->isa_oopptr() != NULL) { + if (!live_oops.at(index)) { + // skip type check for dead oops + continue; + } + } set_local(index, check_interpreter_type(l, type, bad_type_exit)); } for (index = 0; index < sp(); index++) { if (stopped()) break; *** src/share/vm/ci/ciTypeFlow.hpp- Tue Jun 16 21:06:15 2009 --- src/share/vm/ci/ciTypeFlow.hpp Tue Jun 30 11:20:14 2009 *************** *** 1,10 **** #ifdef USE_PRAGMA_IDENT_HDR ! #pragma ident "@(#)ciTypeFlow.hpp 1.17 05/03/01 20:03:28 JVM" #endif /* ! * @(#)ciTypeFlow.hpp 1.17 05/03/01 * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ --- 1,10 ---- #ifdef USE_PRAGMA_IDENT_HDR ! #pragma ident "@(#)ciTypeFlow.hpp 1.18 09/06/10 23:15:08 JVM" #endif /* ! * @(#)ciTypeFlow.hpp 1.18 09/06/10 * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ *************** *** 318,336 **** --- 318,348 ---- void do_newarray(ciByteCodeStream* str); void do_putfield(ciByteCodeStream* str); void do_putstatic(ciByteCodeStream* str); void do_ret(ciByteCodeStream* str); + void overwrite_local_double_long(int index) { + // Invalidate the previous local if it contains first half of + // a double or long value since it's second half is being overwritten. + int prev_index = index - 1; + if (prev_index >= 0 && + (is_double(type_at(local(prev_index))) || + is_long(type_at(local(prev_index))))) { + set_type_at(local(prev_index), bottom_type()); + } + } + void load_local_object(int index) { ciType* type = type_at(local(index)); assert(is_reference(type), "must be reference type"); push(type); } void store_local_object(int index) { ciType* type = pop_value(); assert(is_reference(type) || type->is_return_address(), "must be reference type or return address"); + overwrite_local_double_long(index); set_type_at(local(index), type); } void load_local_double(int index) { ciType* type = type_at(local(index)); *************** *** 343,352 **** --- 355,365 ---- void store_local_double(int index) { ciType* type2 = pop_value(); ciType* type = pop_value(); assert(is_double(type), "must be double"); assert(type2 == double2_type(), "must be 2nd half"); + overwrite_local_double_long(index); set_type_at(local(index), type); set_type_at(local(index+1), type2); } void load_local_float(int index) { *************** *** 355,364 **** --- 368,378 ---- push(type); } void store_local_float(int index) { ciType* type = pop_value(); assert(is_float(type), "must be float type"); + overwrite_local_double_long(index); set_type_at(local(index), type); } void load_local_int(int index) { ciType* type = type_at(local(index)); *************** *** 366,375 **** --- 380,390 ---- push(type); } void store_local_int(int index) { ciType* type = pop_value(); assert(is_int(type), "must be int type"); + overwrite_local_double_long(index); set_type_at(local(index), type); } void load_local_long(int index) { ciType* type = type_at(local(index)); *************** *** 382,391 **** --- 397,407 ---- void store_local_long(int index) { ciType* type2 = pop_value(); ciType* type = pop_value(); assert(is_long(type), "must be long"); assert(type2 == long2_type(), "must be 2nd half"); + overwrite_local_double_long(index); set_type_at(local(index), type); set_type_at(local(index+1), type2); } // Stop interpretation of this path with a trap.
01-07-2009

EVALUATION Register Allocator does not process a data phi with one unique input correctly
05-02-2009