comparison src/share/vm/classfile/verifier.cpp @ 6118:e17b61ba7bb3

7166498: JVM crash in ClassVerifier Summary: Fixed raw pointer being used after potential safepoint/GC Reviewed-by: acorn, fparain, dholmes
author kamg
date Mon, 04 Jun 2012 10:22:37 -0400
parents ed69575596ac
children 9d5f20961bc5 8150fa46d2ed
comparison
equal deleted inserted replaced
6117:4434fdad6b37 6118:e17b61ba7bb3
1736 } 1736 }
1737 } 1737 }
1738 int target = bci + default_offset; 1738 int target = bci + default_offset;
1739 stackmap_table->check_jump_target(current_frame, target, CHECK_VERIFY(this)); 1739 stackmap_table->check_jump_target(current_frame, target, CHECK_VERIFY(this));
1740 for (int i = 0; i < keys; i++) { 1740 for (int i = 0; i < keys; i++) {
1741 // Because check_jump_target() may safepoint, the bytecode could have
1742 // moved, which means 'aligned_bcp' is no good and needs to be recalculated.
1743 aligned_bcp = (address)round_to((intptr_t)(bcs->bcp() + 1), jintSize);
1741 target = bci + (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize); 1744 target = bci + (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize);
1742 stackmap_table->check_jump_target( 1745 stackmap_table->check_jump_target(
1743 current_frame, target, CHECK_VERIFY(this)); 1746 current_frame, target, CHECK_VERIFY(this));
1744 } 1747 }
1748 NOT_PRODUCT(aligned_bcp = NULL); // no longer valid at this point
1745 } 1749 }
1746 1750
1747 bool ClassVerifier::name_in_supers( 1751 bool ClassVerifier::name_in_supers(
1748 Symbol* ref_name, instanceKlassHandle current) { 1752 Symbol* ref_name, instanceKlassHandle current) {
1749 klassOop super = current->super(); 1753 klassOop super = current->super();