crosstool-ng/patches/gcc/2.95.3/deque-leak-fix.patch
Yann E. MORIN" 1906cf93f8 Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
2007-02-24 11:00:05 +00:00

32 lines
1.1 KiB
Diff

[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
Date: Fri, 16 Nov 2001 16:06:22 -0500
From: Phil Edwards <pedwards at disaster dot jaj dot com>
To: gcc-patches at gcc dot gnu dot org
Subject: [libstdc++ trunk & 3.0] Fix deque memory leak
Message-ID: <20011116160622.A23094@disaster.jaj.com>
As discussed on the libstdc++ mailing list. Tested on i686/linux.
2001-11-16 Paolo Carlini <pcarlini@unitus.it>
* include/bits/stl_deque.h (deque::erase()): Fix memory leak.
[rediffed against 2.95.3 -- dank]
--- gcc-2.95.3/libstdc++/stl/stl_deque.h.old 2001-01-01 09:48:22.000000000 -0800
+++ gcc-2.95.3/libstdc++/stl/stl_deque.h 2006-02-18 15:24:17.000000000 -0800
@@ -1052,7 +1052,7 @@
copy_backward(_M_start, __first, __last);
iterator __new_start = _M_start + __n;
destroy(_M_start, __new_start);
- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
+ _M_destroy_nodes(_M_start._M_node, __new_start._M_node); /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
_M_start = __new_start;
}
else {