diff src/share/vm/classfile/stackMapTable.cpp @ 2472:7144a1d6e0a9

7030388: JCK test failed to reject invalid class check01304m10n. Summary: Restrict fix for 7020118 to only when checking exception handlers Reviewed-by: dcubed, dholmes
author kamg
date Thu, 31 Mar 2011 08:08:50 -0400
parents 3582bf76420e
children 3449f5e02cc4
line wrap: on
line diff
--- a/src/share/vm/classfile/stackMapTable.cpp	Fri Apr 01 15:15:37 2011 -0700
+++ b/src/share/vm/classfile/stackMapTable.cpp	Thu Mar 31 08:08:50 2011 -0400
@@ -98,10 +98,13 @@
   bool result = true;
   StackMapFrame *stackmap_frame = _frame_array[frame_index];
   if (match) {
+    // when checking handler target, match == true && update == false
+    bool is_exception_handler = !update;
     // Has direct control flow from last instruction, need to match the two
     // frames.
     result = frame->is_assignable_to(
-      stackmap_frame, CHECK_VERIFY_(frame->verifier(), false));
+      stackmap_frame, is_exception_handler,
+      CHECK_VERIFY_(frame->verifier(), false));
   }
   if (update) {
     // Use the frame in stackmap table as current frame