Date: Fri, 15 Nov 1996 16:50:55 -0500 (EST) From: ejci@gargoyle.bazzle.com To: FreeBSD-gnats-submit@freebsd.org Subject: gnu/2035: STL deque bug Message-ID: <199611152150.QAA15864@gargoyle.bazzle.com> Resent-Message-ID: <199611152200.OAA19956@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 2035
>Category: gnu
>Synopsis: deque bug, local gnu changes to deque header improperly applied
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 15 14:00:02 PST 1996
>Last-Modified:
>Originator: Eric J. Chet
>Organization:
>Release: FreeBSD 3.0-CURRENT i386
>Environment:
-current as of 11/14/96
>Description:
I found the bug in FreeBSD GNU STL version of deque.h. Looks like a source
file maintenance error.
>How-To-Repeat:
#include <iostream.h>
#include <deque.h>
int
main()
{
deque<double> a;
for ( int i = 0 ; i < 8000 ; i++ )
{
a.push_front( i );
}
return 1;
}
>Fix:
*** deque.h.ORG Fri Nov 8 15:36:38 1996
--- deque.h Fri Nov 8 15:36:46 1996
*************** void deque<T>::allocate_at_begin() {
*** 437,444 ****
finish = iterator(finish.current, map + map_size / 4 + i + 1);
} else {
#ifdef __GNUG__
! map_size = map_allocator_type::init_page_size();
! map = map_allocator_type::allocate(map_size);
#else
*--start.node = p;
start = iterator(p + __dq_buffer_size, start.node);
--- 437,446 ----
finish = iterator(finish.current, map + map_size / 4 + i + 1);
} else {
#ifdef __GNUG__
! // map_size = map_allocator_type::init_page_size();
! // map = map_allocator_type::allocate(map_size);
! *--start.node = p;
! start = iterator(p + __dq_buffer_size, start.node);
#else
*--start.node = p;
start = iterator(p + __dq_buffer_size, start.node);
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611152150.QAA15864>
