public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/39775]  New: ext/throw_allocator/check_delete.cc execution abort with mt_allocator
@ 2009-04-15  7:41 hailijuan at gmail dot com
  2009-04-15  7:43 ` [Bug libstdc++/39775] " hailijuan at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hailijuan at gmail dot com @ 2009-04-15  7:41 UTC (permalink / raw)
  To: gcc-bugs

On Solaris 11, we observed execution abort for the testcase below:
+libstdc++.sum:FAIL: ext/throw_allocator/check_delete.cc execution test

The testcase check_delete.cc and its related header files are included in the
attachment bug.tar.
# g++ check_delete.cc -D_GLIBCXX_ASSERT -I.
# ./a.out
Assertion failed: bool(__gnu_test::check_delete<allocator_type, true>()), file
check_delete.cc, line 48
Abort (core dumped)

The error is triggered by defining mt_allocator as the base class to
std::allocator in c++allocator.h. It could be gone by including c++allocator.h
in new/bits/ which define new_allocator as base class. 
# g++ check_delete.cc -D_GLIBCXX_ASSERT -I. -I./new
# ./a.out

We configured gcc 4.3.2 with --enable-libstdcxx-allocator=mt as well as other
options as below. 
# g++ -v
Using built-in specs.
Target: sparc-sun-solaris2.11
Configured with: /import/iropt5/lijuan/plain-gcc/gcc-4.3.2/configure
--prefix=/import/iropt5/lijuan/plain-gcc/compilers/gcc-4.3.2 --enable-shared
--disable-static --with-system-zlib --enable-checking=release
--enable-languages=c,c++ --disable-libobjc --with-cpu=v9
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --with-as=/usr/ccs/bin/as
--without-gnu-as --disable-gnattools --enable-tls
--enable-libstdcxx-allocator=mt
Thread model: posix
gcc version 4.3.2 (GCC)
# uname -a
SunOS gccfss-v890-1 5.11 snv_111 sun4u sparc SUNW,Sun-Fire-V890

Please verify if it's a real bug in gcc or not. If you need any other
information, please let me know. Thanks.


-- 
           Summary: ext/throw_allocator/check_delete.cc execution abort with
                    mt_allocator
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hailijuan at gmail dot com


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


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

* [Bug libstdc++/39775] ext/throw_allocator/check_delete.cc execution abort with mt_allocator
  2009-04-15  7:41 [Bug libstdc++/39775] New: ext/throw_allocator/check_delete.cc execution abort with mt_allocator hailijuan at gmail dot com
@ 2009-04-15  7:43 ` hailijuan at gmail dot com
  2009-04-21  2:24 ` bkoz at gcc dot gnu dot org
  2009-05-12 23:07 ` bkoz at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: hailijuan at gmail dot com @ 2009-04-15  7:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hailijuan at gmail dot com  2009-04-15 07:43 -------
Created an attachment (id=17642)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17642&action=view)
check_delete.cc and its header files.


-- 


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


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

* [Bug libstdc++/39775] ext/throw_allocator/check_delete.cc execution abort with mt_allocator
  2009-04-15  7:41 [Bug libstdc++/39775] New: ext/throw_allocator/check_delete.cc execution abort with mt_allocator hailijuan at gmail dot com
  2009-04-15  7:43 ` [Bug libstdc++/39775] " hailijuan at gmail dot com
@ 2009-04-21  2:24 ` bkoz at gcc dot gnu dot org
  2009-05-12 23:07 ` bkoz at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-04-21  2:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bkoz at gcc dot gnu dot org  2009-04-21 02:23 -------

This is probably fixed in 4.3.3 via


2009-01-12  Benjamin Kosnik  <bkoz@redhat.com>
            Jonathan Larmour  <jifl@eCosCentric.com>

        PR libstdc++/36801
        * config/cpu/generic/atomicity_mutex/atomicity.h (get_atomic_mutex):
        New.
        (__gnu_cxx::__exchange_and_add): Use it.
        * src/debug.cc (get_safe_base_mutex): New.
        * src/locale.cc (get_locale_cache_mutex): New.
        * src/mt_allocator.cc (get_freelist): New.
        (get_freelist_mutex): New.
        * src/pool_allocator.cc (get_palloc_mutex): New.

If so, this PR is a duplicate of that.

-benjamin


-- 


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


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

* [Bug libstdc++/39775] ext/throw_allocator/check_delete.cc execution abort with mt_allocator
  2009-04-15  7:41 [Bug libstdc++/39775] New: ext/throw_allocator/check_delete.cc execution abort with mt_allocator hailijuan at gmail dot com
  2009-04-15  7:43 ` [Bug libstdc++/39775] " hailijuan at gmail dot com
  2009-04-21  2:24 ` bkoz at gcc dot gnu dot org
@ 2009-05-12 23:07 ` bkoz at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-05-12 23:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bkoz at gcc dot gnu dot org  2009-05-12 23:06 -------

Closing as resolved, duplicate of 36801 pending feedback from submitter. If you
feel this is incorrect please re-open and respond to comment #2.


-- 

bkoz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
   GCC host triplet|                            |sparc-sun-solaris2.11
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.3


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


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

end of thread, other threads:[~2009-05-12 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15  7:41 [Bug libstdc++/39775] New: ext/throw_allocator/check_delete.cc execution abort with mt_allocator hailijuan at gmail dot com
2009-04-15  7:43 ` [Bug libstdc++/39775] " hailijuan at gmail dot com
2009-04-21  2:24 ` bkoz at gcc dot gnu dot org
2009-05-12 23:07 ` bkoz 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).