changeset 35105:dd35f17e611d

8144601: Premature assert in directive inline parsing Summary: Break after first fail Reviewed-by: roland
author neliasso
date Wed, 09 Dec 2015 13:41:04 +0100
parents 8c21f17b63e0
children 79f25c397652
files hotspot/src/share/vm/compiler/directivesParser.cpp
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/compiler/directivesParser.cpp	Wed Dec 09 22:57:52 2015 +0100
+++ b/hotspot/src/share/vm/compiler/directivesParser.cpp	Wed Dec 09 13:41:04 2015 +0100
@@ -379,11 +379,12 @@
 
       const char* error_msg = NULL;
       if (current_directiveset == NULL) {
-        if (!current_directive->_c1_store->parse_and_add_inline(s, error_msg)) {
-          assert (error_msg != NULL, "Must have valid error message");
-          error(VALUE_ERROR, "Method pattern error: %s", error_msg);
-        }
-        if (!current_directive->_c2_store->parse_and_add_inline(s, error_msg)) {
+        if (current_directive->_c1_store->parse_and_add_inline(s, error_msg)) {
+          if (!current_directive->_c2_store->parse_and_add_inline(s, error_msg)) {
+            assert (error_msg != NULL, "Must have valid error message");
+            error(VALUE_ERROR, "Method pattern error: %s", error_msg);
+          }
+        } else {
           assert (error_msg != NULL, "Must have valid error message");
           error(VALUE_ERROR, "Method pattern error: %s", error_msg);
         }