diff src/share/vm/memory/allocation.inline.hpp @ 12146:9758d9f36299

8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced Summary: declare all user-defined operator new()s within Hotspot code with the empty throw() exception specification Reviewed-by: coleenp, twisti, dholmes, hseigel, dcubed, kvn, ccheung Contributed-by: lois.foltan@oracle.com
author coleenp
date Thu, 29 Aug 2013 18:56:29 -0400
parents a837fa3d3f86
children 833b0f92429a
line wrap: on
line diff
--- a/src/share/vm/memory/allocation.inline.hpp	Thu Aug 29 21:46:09 2013 +0200
+++ b/src/share/vm/memory/allocation.inline.hpp	Thu Aug 29 18:56:29 2013 -0400
@@ -85,7 +85,7 @@
 
 
 template <MEMFLAGS F> void* CHeapObj<F>::operator new(size_t size,
-      address caller_pc){
+      address caller_pc) throw() {
     void* p = (void*)AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC));
 #ifdef ASSERT
     if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
@@ -94,7 +94,7 @@
   }
 
 template <MEMFLAGS F> void* CHeapObj<F>::operator new (size_t size,
-  const std::nothrow_t&  nothrow_constant, address caller_pc) {
+  const std::nothrow_t&  nothrow_constant, address caller_pc) throw() {
   void* p = (void*)AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC),
       AllocFailStrategy::RETURN_NULL);
 #ifdef ASSERT
@@ -104,12 +104,12 @@
 }
 
 template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
-      address caller_pc){
+      address caller_pc) throw() {
     return CHeapObj<F>::operator new(size, caller_pc);
 }
 
 template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
-  const std::nothrow_t&  nothrow_constant, address caller_pc) {
+  const std::nothrow_t&  nothrow_constant, address caller_pc) throw() {
     return CHeapObj<F>::operator new(size, nothrow_constant, caller_pc);
 }