patches/gcc/2.95.3/140-deque-leak-fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jun 30 21:41:32 2008 +0000 (2008-06-30)
changeset 636 92f2e82084cd
permissions -rw-r--r--
Update samples to the latest architecture framework.

/trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 57 32 25 0 +++++++-----
/trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 60 34 26 0 +++++++------
/trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 43 23 20 0 +++++----
/trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 57 32 25 0 +++++++-----
/trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 46 26 20 0 ++++++----
/trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 56 30 26 0 ++++++------
/trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 43 23 20 0 +++++----
/trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 53 27 26 0 ++++++-----
/trunk/samples/i586-geode-linux-uclibc/crosstool.config | 43 23 20 0 +++++----
/trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 49 29 20 0 ++++++-----
/trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 51 26 25 0 ++++++-----
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 43 23 20 0 +++++----
/trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 44 21 23 0 ++++------
13 files changed, 349 insertions(+), 296 deletions(-)
yann@402
     1
[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
yann@402
     2
yann@402
     3
Date: Fri, 16 Nov 2001 16:06:22 -0500
yann@402
     4
From: Phil Edwards <pedwards at disaster dot jaj dot com>
yann@402
     5
To: gcc-patches at gcc dot gnu dot org
yann@402
     6
Subject: [libstdc++ trunk & 3.0]  Fix deque memory leak
yann@402
     7
Message-ID: <20011116160622.A23094@disaster.jaj.com>
yann@402
     8
yann@402
     9
yann@402
    10
As discussed on the libstdc++ mailing list.  Tested on i686/linux.
yann@402
    11
yann@402
    12
yann@402
    13
yann@402
    14
2001-11-16  Paolo Carlini  <pcarlini@unitus.it>
yann@402
    15
yann@402
    16
	* include/bits/stl_deque.h (deque::erase()):  Fix memory leak.
yann@402
    17
yann@402
    18
yann@402
    19
[rediffed against 2.95.3 -- dank]
yann@402
    20
yann@402
    21
--- gcc-2.95.3/libstdc++/stl/stl_deque.h.old	2001-01-01 09:48:22.000000000 -0800
yann@402
    22
+++ gcc-2.95.3/libstdc++/stl/stl_deque.h	2006-02-18 15:24:17.000000000 -0800
yann@402
    23
@@ -1052,7 +1052,7 @@
yann@402
    24
       copy_backward(_M_start, __first, __last);
yann@402
    25
       iterator __new_start = _M_start + __n;
yann@402
    26
       destroy(_M_start, __new_start);
yann@402
    27
-      _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
yann@402
    28
+      _M_destroy_nodes(_M_start._M_node, __new_start._M_node);  /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
yann@402
    29
       _M_start = __new_start;
yann@402
    30
     }
yann@402
    31
     else {