patches/gcc/2.95.3/deque-leak-fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);

Shut uClibc finish step: there really is nothing to do;

Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);

Did not catch the make errors: fixed the pattern matching in scripts/functions;

Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;

Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
yann@1
     1
[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
yann@1
     2
yann@1
     3
Date: Fri, 16 Nov 2001 16:06:22 -0500
yann@1
     4
From: Phil Edwards <pedwards at disaster dot jaj dot com>
yann@1
     5
To: gcc-patches at gcc dot gnu dot org
yann@1
     6
Subject: [libstdc++ trunk & 3.0]  Fix deque memory leak
yann@1
     7
Message-ID: <20011116160622.A23094@disaster.jaj.com>
yann@1
     8
yann@1
     9
yann@1
    10
As discussed on the libstdc++ mailing list.  Tested on i686/linux.
yann@1
    11
yann@1
    12
yann@1
    13
yann@1
    14
2001-11-16  Paolo Carlini  <pcarlini@unitus.it>
yann@1
    15
yann@1
    16
	* include/bits/stl_deque.h (deque::erase()):  Fix memory leak.
yann@1
    17
yann@1
    18
yann@1
    19
[rediffed against 2.95.3 -- dank]
yann@1
    20
yann@1
    21
--- gcc-2.95.3/libstdc++/stl/stl_deque.h.old	2001-01-01 09:48:22.000000000 -0800
yann@1
    22
+++ gcc-2.95.3/libstdc++/stl/stl_deque.h	2006-02-18 15:24:17.000000000 -0800
yann@1
    23
@@ -1052,7 +1052,7 @@
yann@1
    24
       copy_backward(_M_start, __first, __last);
yann@1
    25
       iterator __new_start = _M_start + __n;
yann@1
    26
       destroy(_M_start, __new_start);
yann@1
    27
-      _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
yann@1
    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@1
    29
       _M_start = __new_start;
yann@1
    30
     }
yann@1
    31
     else {