title: Possible regression in Linux jdk1.6.0_25 x64 (64-bit)
body: <h2>Update:</h2>
  
  <p>I'm trying to have another shot at this because I'd really like to fix this problem.  If anyone would like to aid me in solving the problem I'd greatly appreciate it.</p>
  
  <ol>
  <li><p>Looking at the original backtrace I posted above, you can see that the destructor for this class is being called whilst I don't even construct an object of that type!  I'm pretty clueless about this.</p>
  
  <p><code>#5  0x000000000087f46b in ~EmptyNode (this=0x18f67110) at ../../../plug-ins/mon/ASTNode.h:143</code></p></li>
  <li><p>If I uncomment the above piece of code (i.e., the plug-in), it no longer crashes my application when the debugger isn't attached.  When the debugger is attached it SEG faults ... weird.</p>
  
  <pre>
  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7fffd3ffc700 (LWP 4659)]
  0x00007ffff17ef44f in ?? ()
  (gdb) bt
  0#  0x00007ffff17ef44f in ?? ()
  1#  0x0000000000000000 in ?? ()
  </pre></li>
  <li><p>Here is the entire hs_err_pid that the JVM crash generates:  <a href="http://pastebin.com/Law2yEBN" rel="nofollow">http://pastebin.com/Law2yEBN</a>.  I really would appreciate the help.</p></li>
  <li><p>So I'm wondering the gdb is showing a call to <code>~EmptyNode</code>?  When I don't even instantiate an object of this type.  I'm very sure of this in-fact.</p></li>
  <li><p>Why is the problem manifest in a 64-bit of our app and not a 32-bit version ... </p></li>
  </ol>
  
  <p>I've tried enabling the STL debug macros to see if they would help me in trying to find the cause of this problem but it didn't.  The macros are:  <code>-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC</code>.</p>
  
  <h2>Original Question:</h2>
  
  <p>I think I'm seeing a possible regression in the Sun JVM, but before I go file a bug report with Sun I'd like extra confirmation.</p>
  
  <ol>
  <li>Code that was previously working with jdk1.6.0_21 x64 (64-bit) is now crashing with jdk1.6.0_24+, please see the log below.  Note:  If I run the same version JVM in 32-bit it does not crash.</li>
  <li><p>I have the following switches enabled.  Are there any more that would prove to be useful?</p>
  
  <p><code>-verbose:jni</code></p>
  
  <p><code>-Xcheck:jni</code></p></li>
  <li><p>The log below is what happens after the JVM has been created.  I've also included the stack trace of the crash.  The others threads are created by the JVM because my app is single-threaded.</p></li>
  <li>Are there any debugging tips you could offer me?</li>
  </ol>
  
  <p>I appreciate all the help as I've been trying to fix this all day and I'm running out of ideas.</p>
  
  <p><strong>Linux Version:</strong></p>
  
  <pre><code>$ uname -a
  Linux Centos5x64.ldn.itrs 2.6.18-128.1.1.el5 #1 SMP Wed Mar 25 18:14:28 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
  </code></pre>
  
  <p><strong>Distro:</strong></p>
  
  <pre><code>$ lsb_release -a
  LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
  Distributor ID: CentOS
  Description:    CentOS release 5.3 (Final)
  Release:        5.3
  Codename:       Final
  </code></pre>
  
  <p><strong>Log:</strong></p>
  
  <pre><code>[New Thread 0x41159940 (LWP 32434)]
  [New Thread 0x4125a940 (LWP 32435)]
  [New Thread 0x4135b940 (LWP 32436)]
  [New Thread 0x418e8940 (LWP 32437)]
  [New Thread 0x41f20940 (LWP 32438)]
  [New Thread 0x42021940 (LWP 32439)]
  [New Thread 0x42122940 (LWP 32440)]
  [New Thread 0x42223940 (LWP 32441)]
  &lt;Thu Apr 28 16:53:51&gt;  INFO: JVMManager Function createJavaVM ran ok
  &lt;Thu Apr 28 16:53:51&gt;  INFO: JVMManager probe successfully created a JVM.
  &lt;Thu Apr 28 16:53:51&gt;  INFO: JVMManager java.version = 1.6.0_25
  &lt;Thu Apr 28 16:53:51&gt;  INFO: JVMManager java.vendor = Sun Microsystems Inc.
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops Creating global ref for theStringClass
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops Creating global ref for classLaunchPad
  [New Thread 0x40d3b940 (LWP 32442)]
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops Creating static method reference for doTimerTickForAllSamplers()
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops Creating static method reference for methodDoSample()
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops produceJVM exited
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops pre Apps
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps entered
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 1
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 2
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 3
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 4
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 5
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 6
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 7
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 8
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 9
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 10
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 11
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 12
  &lt;Thu Apr 28 16:53:51&gt; DEBUG: JVMManager:ops launchApps: STAGE 13
  &lt;Thu Apr 28 16:53:51&gt;  INFO: JavaMemory Logging every 10 minutes
  *** glibc detected *** /WorkSpace/users/brucebanner/itracks/PLW-495/probe.linux_64.GA2011.1-110216-g/probe.linux_64: free(): invalid pointer: 0x0000000018f67110 ***
  ======= Backtrace: =========
  /lib64/libc.so.6[0x33bea71ce2]
  /lib64/libc.so.6(cfree+0x8c)[0x33bea7590c]
  /WorkSpace/users/brucebanner/itracks/PLW-495/probe.linux_64.GA2011.1-110216-g/probe.linux_64[0x87f46b]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5dedc87]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5dedc59]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5b2054d]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5a45010]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5e25085]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a59c6c28]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a583b8b3]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a59c6c79]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a59c6eb2]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5a4e62a]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5a4df15]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5ec5a79]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5ebef81]
  /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so[0x2b84a5db696f]
  /lib64/libpthread.so.0[0x33bf606367]
  /lib64/libc.so.6(clone+0x6d)[0x33bead2f7d]
  ======= Memory map: ========
  00400000-01131000 r-xp 00000000 00:18 4735588                            /WorkSpace/users/brucebanner/itracks/PLW-495/probe.linux_64.GA2011.1-110216-g/probe.linux_64
  01331000-01377000 rw-p 00d31000 00:18 4735588                            /WorkSpace/users/brucebanner/itracks/PLW-495/probe.linux_64.GA2011.1-110216-g/probe.linux_64
  01377000-01f95000 rw-p 01377000 00:00 0 
  18e6b000-18f87000 rw-p 18e6b000 00:00 0                                  [heap]
  40c3b000-40c3e000 ---p 40c3b000 00:00 0 
  40c3e000-40d3c000 rwxp 40c3e000 00:00 0 
  41059000-4105a000 ---p 41059000 00:00 0 
  4105a000-4115a000 rwxp 4105a000 00:00 0 
  4115a000-4115d000 ---p 4115a000 00:00 0 
  4115d000-4125b000 rwxp 4115d000 00:00 0 
  4125b000-4125e000 ---p 4125b000 00:00 0 
  4125e000-4135c000 rwxp 4125e000 00:00 0 
  417e8000-417eb000 ---p 417e8000 00:00 0 
  417eb000-418e9000 rwxp 417eb000 00:00 0 
  41e20000-41e23000 ---p 41e20000 00:00 0 
  41e23000-41f21000 rwxp 41e23000 00:00 0 
  41f21000-41f24000 ---p 41f21000 00:00 0 
  41f24000-42022000 rwxp 41f24000 00:00 0 
  42022000-42025000 ---p 42022000 00:00 0 
  42025000-42123000 rwxp 42025000 00:00 0 
  42123000-42124000 ---p 42123000 00:00 0 
  42124000-42224000 rwxp 42124000 00:00 0 
  eb200000-eb730000 rw-p eb200000 00:00 0 
  eb730000-f0600000 rw-p eb730000 00:00 0 
  f0600000-f1080000 rw-p f0600000 00:00 0 
  f1080000-fae00000 rw-p f1080000 00:00 0 
  fae00000-fc2c0000 rw-p fae00000 00:00 0 
  fc2c0000-100000000 rw-p fc2c0000 00:00 0 
  33bda00000-33bda1c000 r-xp 00000000 fd:00 1820674                        /lib64/ld-2.5.so
  33bdc1b000-33bdc1c000 r--p 0001b000 fd:00 1820674                        /lib64/ld-2.5.so
  33bdc1c000-33bdc1d000 rw-p 0001c000 fd:00 1820674                        /lib64/ld-2.5.so
  33bea00000-33beb4c000 r-xp 00000000 fd:00 1820677                        /lib64/libc-2.5.so
  33beb4c000-33bed4c000 ---p 0014c000 fd:00 1820677                        /lib64/libc-2.5.so
  33bed4c000-33bed50000 r--p 0014c000 fd:00 1820677                        /lib64/libc-2.5.so
  33bed50000-33bed51000 rw-p 00150000 fd:00 1820677                        /lib64/libc-2.5.so
  33bed51000-33bed56000 rw-p 33bed51000 00:00 0 
  33bee00000-33bee82000 r-xp 00000000 fd:00 1820684                        /lib64/libm-2.5.so
  33bee82000-33bf081000 ---p 00082000 fd:00 1820684                        /lib64/libm-2.5.so
  33bf081000-33bf082000 r--p 00081000 fd:00 1820684                        /lib64/libm-2.5.so
  33bf082000-33bf083000 rw-p 00082000 fd:00 1820684            
  Program received signal SIGABRT, Aborted.
  [Switching to Thread 0x41f20940 (LWP 32438)]
  0x00000033bea30215 in raise () from /lib64/libc.so.6
  (gdb) info threads
    10 Thread 0x40d3b940 (LWP 32442)  0x00000033bf60ab00 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    9 Thread 0x42223940 (LWP 32441)  0x00000033bf60ab00 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    8 Thread 0x42122940 (LWP 32440)  0x00000033bf60a899 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    7 Thread 0x42021940 (LWP 32439)  0x00000033bf60a899 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  * 6 Thread 0x41f20940 (LWP 32438)  0x00000033bea30215 in raise () from /lib64/libc.so.6
    5 Thread 0x418e8940 (LWP 32437)  0x00000033bf60c6b1 in sem_wait () from /lib64/libpthread.so.0
    4 Thread 0x4135b940 (LWP 32436)  0x00000033bf60a899 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    3 Thread 0x4125a940 (LWP 32435)  0x00000033bf60a899 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    2 Thread 0x41159940 (LWP 32434)  0x00000033bf60ab00 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    1 Thread 0x2b84a51af9b0 (LWP 32373)  0x00002b84a5e8f160 in SystemDictionary::resolve_instance_class_or_null ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  (gdb) bt
  #0  0x00000033bea30215 in raise () from /lib64/libc.so.6
  #1  0x00000033bea31cc0 in abort () from /lib64/libc.so.6
  #2  0x00000033bea6a7fb in __libc_message () from /lib64/libc.so.6
  #3  0x00000033bea71ce2 in _int_free () from /lib64/libc.so.6
  #4  0x00000033bea7590c in free () from /lib64/libc.so.6
  #5  0x000000000087f46b in ~EmptyNode (this=0x18f67110) at ../../../plug-ins/mon/ASTNode.h:143
  #6  0x00002b84a5dedc87 in PhaseGVN::transform_no_reclaim ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #7  0x00002b84a5dedc59 in PhaseGVN::transform ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #8  0x00002b84a5b2054d in GraphKit::gen_stub ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #9  0x00002b84a5a45010 in Compile::Compile ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #10 0x00002b84a5e25085 in OptoRuntime::generate ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #11 0x00002b84a59c6c28 in C2Compiler::initialize_runtime ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #12 0x00002b84a583b8b3 in AbstractCompiler::initialize_runtimes ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #13 0x00002b84a59c6c79 in C2Compiler::initialize ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #14 0x00002b84a59c6eb2 in C2Compiler::compile_method ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #15 0x00002b84a5a4e62a in CompileBroker::invoke_compiler_on_method ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #16 0x00002b84a5a4df15 in CompileBroker::compiler_thread_loop ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #17 0x00002b84a5ec5a79 in compiler_thread_entry ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #18 0x00002b84a5ebef81 in JavaThread::run ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #19 0x00002b84a5db696f in java_start ()
     from /export/nas02/users/brucebanner/itracks/PLW-495/x64/jdk1.6.0_25/jre/lib/amd64/server/libjvm.so
  #20 0x00000033bf606367 in start_thread () from /lib64/libpthread.so.0
  #21 0x00000033bead2f7d in clone () from /lib64/libc.so.6
  </code></pre>