public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/17780] New: std::allocator vs. static init
@ 2004-10-01 16:48 bkoz at gcc dot gnu dot org
  2004-10-01 16:48 ` [Bug libstdc++/17780] " bkoz at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-10-01 16:48 UTC (permalink / raw)
  To: gcc-bugs

Real QoI issue. First reported here:

http://gcc.gnu.org/ml/libstdc++/2004-07/msg00038.html

Seeing other reports in Red Hat's bugzilla.

This is not a libsupc++ issue, but rather an issue with the default allocator.
For 3.4.0, this is fixed because std::allocator uses new_allocator. However,
current incarnations of __mt_alloc and __pool_alloc have issues.

Working on a fix.

-benjamin

-- 
           Summary: std::allocator vs. static init
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org
                CC: adah at netstd dot com,gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
@ 2004-10-01 16:48 ` bkoz at gcc dot gnu dot org
  2004-10-01 16:49 ` bkoz at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-10-01 16:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-10-01 16:48 -------
Created an attachment (id=7255)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7255&action=view)
test case


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
  2004-10-01 16:48 ` [Bug libstdc++/17780] " bkoz at gcc dot gnu dot org
@ 2004-10-01 16:49 ` bkoz at gcc dot gnu dot org
  2004-10-01 16:51 ` bkoz at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-10-01 16:49 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-01 16:49:10
               date|                            |
            Summary|std::allocator vs. static   |std::allocator vs. static
                   |init                        |init


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
  2004-10-01 16:48 ` [Bug libstdc++/17780] " bkoz at gcc dot gnu dot org
  2004-10-01 16:49 ` bkoz at gcc dot gnu dot org
@ 2004-10-01 16:51 ` bkoz at gcc dot gnu dot org
  2004-10-01 16:52 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-10-01 16:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-10-01 16:51 -------
Referenced in Red Hat bugzilla 128467

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-10-01 16:51 ` bkoz at gcc dot gnu dot org
@ 2004-10-01 16:52 ` pinskia at gcc dot gnu dot org
  2004-10-01 17:00 ` bkoz at redhat dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-01 16:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-01 16:52 -------
Isn't this undefined?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-10-01 16:52 ` pinskia at gcc dot gnu dot org
@ 2004-10-01 17:00 ` bkoz at redhat dot com
  2004-10-01 17:05 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bkoz at redhat dot com @ 2004-10-01 17:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at redhat dot com  2004-10-01 16:59 -------
Subject: Re:  std::allocator vs. static init


>Isn't this undefined?

What do you mean? What, exactly, is undefined?

This is a straight-out leak to me, and is a QoI issue.

-benjamin


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-10-01 17:00 ` bkoz at redhat dot com
@ 2004-10-01 17:05 ` pinskia at gcc dot gnu dot org
  2004-10-06  4:22 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-01 17:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-01 17:05 -------
The order of execution of template initializers.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-10-01 17:05 ` pinskia at gcc dot gnu dot org
@ 2004-10-06  4:22 ` cvs-commit at gcc dot gnu dot org
  2004-10-06 16:31 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-06  4:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-06 04:22 -------
Subject: Bug 17780

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-10-06 04:22:42

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/config: linker-map.gnu 
	libstdc++-v3/include/ext: mt_allocator.h 
	libstdc++-v3/src: mt_allocator.cc 
	libstdc++-v3/testsuite/ext/mt_allocator: instantiate.cc 
Added files:
	libstdc++-v3/testsuite/ext/malloc_allocator: 
	                                             deallocate_global.cc 
	                                             deallocate_local.cc 
	libstdc++-v3/testsuite/ext/mt_allocator: deallocate_global-1.cc 
	                                         deallocate_global-2.cc 
	                                         deallocate_global-3.cc 
	                                         deallocate_global-4.cc 
	                                         deallocate_local-1.cc 
	                                         deallocate_local-2.cc 
	                                         deallocate_local-3.cc 
	                                         deallocate_local-4.cc 
	libstdc++-v3/testsuite/ext/new_allocator: check_new.cc 
	                                          deallocate_global.cc 
	                                          deallocate_local.cc 
	                                          instantiate.cc 

Log message:
	2004-10-05  Benjamin Kosnik  <bkoz@redhat.com>
	
	PR libstdc++/17780
	* include/ext/mt_allocator.h (__pool_base::_Tune): Add default
	options as compile-time constant enums.
	(__pool_base::_Tune::is_default): New.
	(__pool_base::_Block_address): New.
	(__pool_base): Rearrange data members.
	(__pool::_M_reserve_memory): To _M_reserve_block.
	(__pool::_M_reclaim_memory): To _M_reclaim_block.
	(__pool::_Bin_record): Add _Block_address data member.
	(__pool<false>): Add _M_thread_freelist_initial.
	(__pool::~__pool): Declare.
	(__common_pool_policy): Move static data member to...
	(__common_pool_policy::_S_get_pool): ...here, make static local.
	(__per_type_pool_policy): Move static data member to...
	(__per_type_pool_policy::_S_get_pool): ...here, make static local.
	(__mt_alloc::__mt_alloc): Call __policy_type::_S_get_pool.
	Remove static member definitions. Use define for __default_policy.
	* src/mt_allocator.cc: Same.
	* config/linker-map.gnu: Don't export _S_get_pool. Renames.
	* testsuite/ext/new_allocator: New.
	* testsuite/ext/new_allocator/instantiate.cc: New.
	* testsuite/ext/new_allocator/check_new.cc: New.
	* testsuite/ext/new_allocator/deallocate_global.cc: New.
	* testsuite/ext/new_allocator/deallocate_local.cc: New.
	* testsuite/ext/mt_allocator/instantiate.cc: Instantiate all
	template arguments.
	* testsuite/ext/mt_allocator/deallocate_global-1.cc: New.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: New.
	* testsuite/ext/mt_allocator/deallocate_global-3.cc: New.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-1.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-3.cc: New.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: New.
	* testsuite/ext/mt_allocator/deallocate.cc: New.
	* testsuite/ext/malloc_allocator/deallocate.cc: New.
	* testsuite/ext/malloc_allocator/deallocate_global.cc: New.
	* testsuite/ext/malloc_allocator/deallocate_local.cc: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2684&r2=1.2685
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/linker-map.gnu.diff?cvsroot=gcc&r1=1.71&r2=1.72
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/ext/mt_allocator.h.diff?cvsroot=gcc&r1=1.34&r2=1.35
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/mt_allocator.cc.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/malloc_allocator/deallocate_global.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/malloc_allocator/deallocate_local.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/new_allocator/check_new.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/new_allocator/deallocate_global.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/new_allocator/deallocate_local.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/ext/new_allocator/instantiate.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-10-06  4:22 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-06 16:31 ` cvs-commit at gcc dot gnu dot org
  2004-10-28 21:53 ` bkoz at gcc dot gnu dot org
  2004-10-28 21:56 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-06 16:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-06 16:31 -------
Subject: Bug 17780

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-10-06 16:31:19

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/src: mt_allocator.cc 

Log message:
	2004-10-06  Benjamin Kosnik  <bkoz@redhat.com>
	Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/17780
	* src/mt_allocator.cc (__pool<true>::_M_reserve_block): Revert
	to old locking order.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2686&r2=1.2687
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/mt_allocator.cc.diff?cvsroot=gcc&r1=1.2&r2=1.3



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-10-06 16:31 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-28 21:53 ` bkoz at gcc dot gnu dot org
  2004-10-28 21:56 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-10-28 21:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-10-28 21:53 -------

Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/17780] std::allocator vs. static init
  2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-10-28 21:53 ` bkoz at gcc dot gnu dot org
@ 2004-10-28 21:56 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28 21:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17780


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-10-28 21:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 16:48 [Bug libstdc++/17780] New: std::allocator vs. static init bkoz at gcc dot gnu dot org
2004-10-01 16:48 ` [Bug libstdc++/17780] " bkoz at gcc dot gnu dot org
2004-10-01 16:49 ` bkoz at gcc dot gnu dot org
2004-10-01 16:51 ` bkoz at gcc dot gnu dot org
2004-10-01 16:52 ` pinskia at gcc dot gnu dot org
2004-10-01 17:00 ` bkoz at redhat dot com
2004-10-01 17:05 ` pinskia at gcc dot gnu dot org
2004-10-06  4:22 ` cvs-commit at gcc dot gnu dot org
2004-10-06 16:31 ` cvs-commit at gcc dot gnu dot org
2004-10-28 21:53 ` bkoz at gcc dot gnu dot org
2004-10-28 21:56 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).