hotspot/src/share/vm/runtime/thread.cpp
changeset 31371 311143309e73
parent 30764 fec48bf5a827
child 31373 21f527ce09e0
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Jun 17 21:44:48 2015 +0000
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Thu Jun 18 14:39:38 2015 -0500
@@ -54,6 +54,7 @@
 #include "runtime/deoptimization.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/frame.inline.hpp"
+#include "runtime/globals.hpp"
 #include "runtime/init.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/java.hpp"
@@ -3303,6 +3304,11 @@
   jint ergo_result = Arguments::apply_ergo();
   if (ergo_result != JNI_OK) return ergo_result;
 
+  // Final check of all arguments after ergonomics which may change values.
+  if (!CommandLineFlags::check_all_ranges_and_constraints()) {
+    return JNI_EINVAL;
+  }
+
   if (PauseAtStartup) {
     os::pause();
   }