# HG changeset patch # User jiangli # Date 1341536085 14400 # Node ID 83a11fe60ae1a5c8534b33217644d1f31339d78a # Parent ead8152d934141097a6cbd6071c18988d5ddc1d4 7181632: nsk classLoad001_14 failure and CompileTheWorld crash after 7178145. Summary: Need to copy the inlined exception table to the new constMethodOop during method rewriting. Reviewed-by: coleenp, dholmes diff -r ead8152d9341 -r 83a11fe60ae1 src/share/vm/oops/methodOop.cpp --- a/src/share/vm/oops/methodOop.cpp Wed Nov 16 05:05:35 2016 +0000 +++ b/src/share/vm/oops/methodOop.cpp Thu Jul 05 20:54:45 2012 -0400 @@ -1082,6 +1082,7 @@ newm->set_method_size(new_method_size); assert(newm->code_size() == new_code_length, "check"); assert(newm->checked_exceptions_length() == checked_exceptions_len, "check"); + assert(newm->exception_table_length() == exception_table_len, "check"); assert(newm->localvariable_table_length() == localvariable_len, "check"); // Copy new byte codes memcpy(newm->code_base(), new_code, new_code_length); @@ -1097,6 +1098,12 @@ m->checked_exceptions_start(), checked_exceptions_len * sizeof(CheckedExceptionElement)); } + // Copy exception table + if (exception_table_len > 0) { + memcpy(newm->exception_table_start(), + m->exception_table_start(), + exception_table_len * sizeof(ExceptionTableElement)); + } // Copy local variable number table if (localvariable_len > 0) { memcpy(newm->localvariable_table_start(),