8140343: SEGV in DirectivesStack::getMatchingDirective
authorneliasso
Fri, 23 Oct 2015 10:57:41 +0200
changeset 33479 2f62e0833ea2
parent 33478 e119795bddb7
child 33480 e4cef6796874
child 33481 cef122ff96a1
8140343: SEGV in DirectivesStack::getMatchingDirective Summary: Could not match JVMCI compiler Reviewed-by: kvn
hotspot/src/share/vm/compiler/compilerDirectives.cpp
--- a/hotspot/src/share/vm/compiler/compilerDirectives.cpp	Wed Oct 28 15:44:28 2015 +0100
+++ b/hotspot/src/share/vm/compiler/compilerDirectives.cpp	Fri Oct 23 10:57:41 2015 +0200
@@ -487,6 +487,15 @@
     while (dir != NULL) {
       if (dir->is_default_directive() || dir->match(method)) {
         match = dir->get_for(comp);
+        if (match == NULL) {
+          // temporary workaround for compilers without directives.
+          if (dir->is_default_directive()) {
+            // default dir is always enabled
+            // match c1 store - it contains all common flags even if C1 is unavailable
+            match = dir->_c1_store;
+            break;
+          }
+        }
         if (match->EnableOption) {
           // The directiveSet for this compile is also enabled -> success
           break;