8165753: Custom security manager, crashing wth 'java/security/AccessControlException'
authorvkempik
Fri, 17 Feb 2017 02:31:12 +0000
changeset 46273 898ec28d19d7
parent 46272 3cee5c1f3459
child 46274 534d019edb92
child 46291 a24addecca3a
8165753: Custom security manager, crashing wth 'java/security/AccessControlException' Reviewed-by: dholmes, dcubed
hotspot/src/share/vm/runtime/os.cpp
hotspot/src/share/vm/runtime/os.hpp
hotspot/src/share/vm/runtime/thread.cpp
--- a/hotspot/src/share/vm/runtime/os.cpp	Fri Jan 27 10:22:19 2017 +0100
+++ b/hotspot/src/share/vm/runtime/os.cpp	Fri Feb 17 02:31:12 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -347,10 +347,9 @@
   VM_Version::init_before_ergo();
 }
 
-void os::signal_init() {
+void os::signal_init(TRAPS) {
   if (!ReduceSignalUsage) {
     // Setup JavaThread for processing signals
-    EXCEPTION_MARK;
     Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK);
     instanceKlassHandle klass (THREAD, k);
     instanceHandle thread_oop = klass->allocate_instance_handle(CHECK);
--- a/hotspot/src/share/vm/runtime/os.hpp	Fri Jan 27 10:22:19 2017 +0100
+++ b/hotspot/src/share/vm/runtime/os.hpp	Fri Feb 17 02:31:12 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -731,7 +731,7 @@
   static struct hostent* get_host_by_name(char* name);
 
   // Support for signals (see JVM_RaiseSignal, JVM_RegisterSignal)
-  static void  signal_init();
+  static void  signal_init(TRAPS);
   static void  signal_init_pd();
   static void  signal_notify(int signal_number);
   static void* signal(int signal_number, void* handler);
--- a/hotspot/src/share/vm/runtime/thread.cpp	Fri Jan 27 10:22:19 2017 +0100
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Fri Feb 17 02:31:12 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3717,7 +3717,7 @@
 #endif // INCLUDE_MANAGEMENT
 
   // Signal Dispatcher needs to be started before VMInit event is posted
-  os::signal_init();
+  os::signal_init(CHECK_JNI_ERR);
 
   // Start Attach Listener if +StartAttachListener or it can't be started lazily
   if (!DisableAttachMechanism) {