6970566: runThese fails with SIGSEGV
authornever
Thu, 22 Jul 2010 15:29:22 -0700
changeset 6065 26016b8ed869
parent 6064 71e316283a85
child 6066 3046588b1ba8
child 6177 12835feea156
6970566: runThese fails with SIGSEGV Reviewed-by: kvn
hotspot/src/share/vm/code/codeBlob.cpp
hotspot/src/share/vm/code/codeBlob.hpp
--- a/hotspot/src/share/vm/code/codeBlob.cpp	Fri Jul 16 18:14:19 2010 -0700
+++ b/hotspot/src/share/vm/code/codeBlob.cpp	Thu Jul 22 15:29:22 2010 -0700
@@ -202,6 +202,11 @@
 //----------------------------------------------------------------------------------------------------
 // Implementation of AdapterBlob
 
+AdapterBlob::AdapterBlob(int size, CodeBuffer* cb) :
+  BufferBlob("I2C/C2I adapters", size, cb) {
+  CodeCache::commit(this);
+}
+
 AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
   ThreadInVMfromUnknown __tiv;  // get to VM state in case we block on CodeCache_lock
 
@@ -210,7 +215,6 @@
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     blob = new (size) AdapterBlob(size, cb);
-    CodeCache::commit(blob);
   }
   // Track memory usage statistic after releasing CodeCache_lock
   MemoryService::track_code_cache_memory_usage();
--- a/hotspot/src/share/vm/code/codeBlob.hpp	Fri Jul 16 18:14:19 2010 -0700
+++ b/hotspot/src/share/vm/code/codeBlob.hpp	Thu Jul 22 15:29:22 2010 -0700
@@ -219,8 +219,7 @@
 
 class AdapterBlob: public BufferBlob {
 private:
-  AdapterBlob(int size)                 : BufferBlob("I2C/C2I adapters", size) {}
-  AdapterBlob(int size, CodeBuffer* cb) : BufferBlob("I2C/C2I adapters", size, cb) {}
+  AdapterBlob(int size, CodeBuffer* cb);
 
 public:
   // Creation