From owner-freebsd-current Wed Nov 13 19:09:15 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA07674 for current-outgoing; Wed, 13 Nov 1996 19:09:15 -0800 (PST) Received: from gargoyle.bazzle.com (gargoyle.bazzle.com [206.103.246.190]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA07540 for ; Wed, 13 Nov 1996 19:07:37 -0800 (PST) Received: from gargoyle.bazzle.com (localhost [127.0.0.1]) by gargoyle.bazzle.com (8.8.2/8.6.12) with SMTP id WAA00909; Wed, 13 Nov 1996 22:07:18 -0500 (EST) Date: Wed, 13 Nov 1996 22:07:18 -0500 (EST) From: "Eric J. Chet" To: current@freebsd.org cc: dob@nasvr1.cb.lucent.com Subject: diff.deque.h (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello We have a bug in deque.h, I think this should be patched. Eric J. Chet - ejc@bazzle.com ---------- Forwarded message ---------- Date: Fri, 8 Nov 1996 15:45:43 -0500 From: "Dan O'Brien, 614.860.3292" To: ejc@naserver1.cb.lucent.com, ejc@gargoyle.bazzle.com Subject: diff.deque.h Eric, I found the bug in FreeBSD GNU STL version of deque.h. Looks like a source file maintenance error. Here is the patch. *** deque.h.ORG Fri Nov 8 15:36:38 1996 --- deque.h Fri Nov 8 15:36:46 1996 *************** void deque::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); I'm not sure who to submit this to. Please forward it to whomever should receive this bug report. Here is a test program. It core dumps without the patch. #include #include int main() { deque a; for ( int i = 0 ; i < 8000 ; i++ ) { a.push_front( i ); } return 1; } Thanks for handling this report, Dan O'Brien