]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/19510 ([3.3 only] Uninitialized pointers in iterators)
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Fri, 21 Jan 2005 23:52:49 +0000 (23:52 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Fri, 21 Jan 2005 23:52:49 +0000 (23:52 +0000)
PR libstdc++/19510
* include/bits/stl_list.h (_List_iterator_base): Initialize _M_node
in constructor.
(_List_iterator): Initialize _List_iterator_base in constructor.
* include/bits/stl_tree.h (_Rb_tree_iterator): Initialize _M_node
in constructor.

From-SVN: r94048

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_tree.h

index 6611ca3aaee8151c292dd9d3f8f5b4ebe6d1c5e0..64a4bb876dd3ee38f4108b62ddd3e7be4cb1ce57 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR libstdc++/19510
+       * include/bits/stl_list.h (_List_iterator_base): Initialize _M_node
+       in constructor.
+       (_List_iterator): Initialize _List_iterator_base in constructor.
+       * include/bits/stl_tree.h (_Rb_tree_iterator): Initialize _M_node
+       in constructor.
+
 2004-12-03  Richard Henderson  <rth@redhat.com>
 
        PR 17856
index fcba3598df248420458771ab44343b95e5a73e1f..132ae254eee2a51aa5cc73ee231f3d66582f7d2e 100644 (file)
@@ -1,6 +1,6 @@
 // List implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -108,6 +108,7 @@ namespace std
     { }
   
     _List_iterator_base()
+    : _M_node()
     { }
   
     /// Walk the %list forward.
@@ -156,6 +157,7 @@ namespace std
     { }
   
     _List_iterator()
+    : _List_iterator_base()
     { }
   
     _List_iterator(const iterator& __x)
index 1e7fdf5db2daec8fe008699dcd43c19134ccc0d2..0fa098be170200b50eb59003550cd46afff55673 100644 (file)
@@ -1,6 +1,6 @@
 // RB tree implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -191,7 +191,7 @@ namespace std
       typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
       typedef _Rb_tree_node<_Val>* _Link_type;
       
-      _Rb_tree_iterator() {}
+      _Rb_tree_iterator() { _M_node = 0; }
       _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
       _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }