# HG changeset patch # User poonam # Date 1251873248 25200 # Node ID 6918603297f7aa69b8d74fe38126fd2c99adaacc # Parent bb287c042e993c09436eacf77ad291d86cb2123f 6858208: jvm crash when specifying TypeProfileWidth=0 on jdk 6.0 Summary: Add an explicit check for TypeProfileWidth == 0 in record_klass_in_profile_helper() functions. Reviewed-by: never, coleenp diff -r bb287c042e99 -r 6918603297f7 src/cpu/sparc/vm/interp_masm_sparc.cpp --- a/src/cpu/sparc/vm/interp_masm_sparc.cpp Sun Aug 30 15:33:14 2009 -0700 +++ b/src/cpu/sparc/vm/interp_masm_sparc.cpp Tue Sep 01 23:34:08 2009 -0700 @@ -1696,6 +1696,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper( Register receiver, Register scratch, int start_row, Label& done) { + if (TypeProfileWidth == 0) + return; + int last_row = VirtualCallData::row_limit() - 1; assert(start_row <= last_row, "must be work left to do"); // Test this row for both the receiver and for null. diff -r bb287c042e99 -r 6918603297f7 src/cpu/x86/vm/interp_masm_x86_32.cpp --- a/src/cpu/x86/vm/interp_masm_x86_32.cpp Sun Aug 30 15:33:14 2009 -0700 +++ b/src/cpu/x86/vm/interp_masm_x86_32.cpp Tue Sep 01 23:34:08 2009 -0700 @@ -1262,6 +1262,9 @@ Register receiver, Register mdp, Register reg2, int start_row, Label& done) { + if (TypeProfileWidth == 0) + return; + int last_row = VirtualCallData::row_limit() - 1; assert(start_row <= last_row, "must be work left to do"); // Test this row for both the receiver and for null. diff -r bb287c042e99 -r 6918603297f7 src/cpu/x86/vm/interp_masm_x86_64.cpp --- a/src/cpu/x86/vm/interp_masm_x86_64.cpp Sun Aug 30 15:33:14 2009 -0700 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp Tue Sep 01 23:34:08 2009 -0700 @@ -1272,6 +1272,9 @@ Register receiver, Register mdp, Register reg2, int start_row, Label& done) { + if (TypeProfileWidth == 0) + return; + int last_row = VirtualCallData::row_limit() - 1; assert(start_row <= last_row, "must be work left to do"); // Test this row for both the receiver and for null.