6679708: No_Safepoint_Verifier and BacktraceBuilder have uninitialized fields
authornever
Wed, 26 Mar 2008 12:25:06 -0700
changeset 345 8a4c345e460c
parent 249 8a8601fb5571
child 346 e13ccc474a28
6679708: No_Safepoint_Verifier and BacktraceBuilder have uninitialized fields Summary: fix or remove uninitialized fields Reviewed-by: kvn, rasbold
hotspot/src/share/vm/classfile/javaClasses.cpp
hotspot/src/share/vm/memory/gcLocker.hpp
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Mar 21 08:32:17 2008 -0700
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Wed Mar 26 12:25:06 2008 -0700
@@ -1015,7 +1015,6 @@
   typeArrayOop    _bcis;
   int             _index;
   bool            _dirty;
-  bool            _done;
   No_Safepoint_Verifier _nsv;
 
  public:
@@ -1029,12 +1028,10 @@
   };
 
   // constructor for new backtrace
-  BacktraceBuilder(TRAPS): _methods(NULL), _bcis(NULL), _head(NULL) {
+  BacktraceBuilder(TRAPS): _methods(NULL), _bcis(NULL), _head(NULL), _dirty(false) {
     expand(CHECK);
     _backtrace = _head;
     _index = 0;
-    _dirty = false;
-    _done = false;
   }
 
   void flush() {
--- a/hotspot/src/share/vm/memory/gcLocker.hpp	Fri Mar 21 08:32:17 2008 -0700
+++ b/hotspot/src/share/vm/memory/gcLocker.hpp	Wed Mar 26 12:25:06 2008 -0700
@@ -184,7 +184,9 @@
   Thread *_thread;
  public:
 #ifdef ASSERT
-  No_Safepoint_Verifier(bool activated = true, bool verifygc = true ) : No_GC_Verifier(verifygc) {
+  No_Safepoint_Verifier(bool activated = true, bool verifygc = true ) :
+    No_GC_Verifier(verifygc),
+    _activated(activated) {
     _thread = Thread::current();
     if (_activated) {
       _thread->_allow_allocation_count++;