This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[Patch] Fix libstdc++/9582
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Cc: bkoz <bkoz at redhat dot com>, Phil Edwards <phil at jaj dot com>
- Date: Tue, 18 Feb 2003 00:25:09 +0100
- Subject: [Patch] Fix libstdc++/9582
Hi,
besides the more specific reasons put forward by Pétur
(with which I agree), I note that there are no assert
anywhere else in v3: by itself seems a good reason to
remove it from __pool_alloc, used by default in
std::allocator.
OTOH, I would rather keep a couple of assert present in the
special __debug_alloc.
Ok for trunk and 3_3?
Paolo.
/////////
2003-02-17 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/9582
* include/bits/stl_alloc.h (__pool_alloc::allocate):
Remove assert.
diff -urN libstdc++-v3-orig/include/bits/stl_alloc.h libstdc++-v3/include/bits/stl_alloc.h
--- libstdc++-v3-orig/include/bits/stl_alloc.h 2003-02-16 12:22:29.000000000 +0100
+++ libstdc++-v3/include/bits/stl_alloc.h 2003-02-18 00:09:57.000000000 +0100
@@ -352,8 +352,6 @@
__atomic_add(&_S_force_new, 1);
else
__atomic_add(&_S_force_new, -1);
- // Trust but verify...
- assert(_S_force_new != 0);
}
if ((__n > (size_t) _MAX_BYTES) || (_S_force_new > 0))