public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pluto at agmk dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/39979]  New: possible wrong code at -O0.
Date: Thu, 30 Apr 2009 17:45:00 -0000	[thread overview]
Message-ID: <bug-39979-7667@http.gcc.gnu.org/bugzilla/> (raw)

hi,

i'm currently testing gcc-4.4.1-20090427 on my large c++ codebase.
the application uses threads, contains over 100+ shared components
and the tested debug build (-O0 -g2 -fpic) needs over 2GB of disk space,
so creating reduced testcase at this point isn't trivial thing.

i've observed that boost-1.38.0 and/or stlport-5.2.1 used in this project
are broken by gcc-4.4.1 and trig abort() in glibc malloc checker.
application linked with boost/stlport compiled with gcc-4.3 works fine.

after few hours of valgrinding i've noticed following errors
with gcc-4.4.1/boost/stlport which don't happen with gcc-4.3.


% grep Invalid -A5 valgrind.log.24977                                  
==24977== Invalid write of size 8                                               
==24977==    at 0x327AA0F6D2: _dl_allocate_tls_init (in /lib64/ld-2.5.so)       
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)                   
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)       
==24977==    by 0x54D2983:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperIN2au9Function0IvEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D2769: ts::MakeThread(au::Function0<void> const&)
(tsMain.cpp:333)                                          
--                                                                              
==24977== Invalid write of size 1                                               
==24977==    at 0x327AA0F6E5: _dl_allocate_tls_init (in /lib64/ld-2.5.so)       
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)                                         
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)       
==24977==    by 0x54D2983:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperIN2au9Function0IvEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D2769: ts::MakeThread(au::Function0<void> const&)
(tsMain.cpp:333)                                          
--                                                                              
==24977== Invalid write of size 8                                               
==24977==    at 0x327AA0F6D2: _dl_allocate_tls_init (in /lib64/ld-2.5.so)       
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)                                         
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)       
==24977==    by 0x54D2A33:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperINS_8functionIFvvEEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D27F4: _ZN2ts10MakeThreadERKN5boost8functionIFvvEEE
(tsMain.cpp:339)                                         
--                                                                              
==24977== Invalid write of size 1                                               
==24977==    at 0x327AA0F6E5: _dl_allocate_tls_init (in /lib64/ld-2.5.so)       
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)                                          
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)       
==24977==    by 0x54D2A33:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperINS_8functionIFvvEEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D27F4: _ZN2ts10MakeThreadERKN5boost8functionIFvvEEE
(tsMain.cpp:339)                                         
--                                                                              
==24977== Invalid read of size 8                                                
==24977==    at 0x20F9E46E: void au::Delete::operator()<es::Port>(es::Port
const*) const (auOpDelete.hpp:13)                     
==24977==    by 0x20F9DBAF: au::Delete
stlpd_std::for_each<stlpd_std::priv::_DBG_iter<stlpd_std::priv::_NonDbg_vector<es::Port*,
stlpd_std::allocator<es::Port*> >,
stlpd_std::priv::_DbgTraits<stlpd_std::priv::_Vector_nonconst_traits<es::Port*,
es::Port**> > >,
au::Delete>(stlpd_std::priv::_DBG_iter<stlpd_std::priv::_NonDbg_vector<es::Port*,
stlpd_std::allocator<es::Port*> >,
stlpd_std::priv::_DbgTraits<stlpd_std::priv::_Vector_nonconst_traits<es::Port*,
es::Port**> > >,
stlpd_std::priv::_DBG_iter<stlpd_std::priv::_NonDbg_vector<es::Port*,
stlpd_std::allocator<es::Port*> >,
stlpd_std::priv::_DbgTraits<stlpd_std::priv::_Vector_nonconst_traits<es::Port*,
es::Port**> > >, au::Delete) (_algo.h:61)                                       
==24977==    by 0x20F99CB4: es::Instance::~Instance() (esInstance.cpp:104)      
==24977==    by 0x20F7EAF5: es::EdifInstance::~EdifInstance()
(esEdifInstance.cpp:27)                                                         
==24977==    by 0x20F7D61C: es::EdifBlackInstance::~EdifBlackInstance()
(esEdifBlackInstance.cpp:21)                                                    
--                                                                              
==24977== Invalid read of size 8                                                
==24977==    at 0x327AA0F575: _dl_tls_get_addr_soft (in /lib64/ld-2.5.so)       
==24977==    by 0x327AF06039: dl_iterate_phdr (in /lib64/libc-2.5.so)           
==24977==    by 0x4D5DBFE: _Unwind_Find_FDE (unwind-dw2-fde-glibc.c:417)        
==24977==    by 0x4D5B042: uw_frame_state_for (unwind-dw2.c:1128)               
==24977==    by 0x4D5BB3A: _Unwind_Backtrace (unwind.inc:290)                   
--                                                                              
==24977== Invalid read of size 8                                                
==24977==    at 0x20F9E46E: void au::Delete::operator()<es::Port>(es::Port
const*) const (auOpDelete.hpp:13)                                               
==24977==    by 0x20F9DBAF: au::Delete
stlpd_std::for_each<stlpd_std::priv::_DBG_iter<stlpd_std::priv::_NonDbg_vector<es::Port*,
stlpd_std::allocator<es::Port*> >,
stlpd_std::priv::_DbgTraits<stlpd_std::priv::_Vector_nonconst_traits<es::Port*,
es::Port**> > >,
au::Delete>(stlpd_std::priv::_DBG_iter<stlpd_std::priv::_NonDbg_vector<es::Port*,
stlpd_std::allocator<es::Port*> >,
stlpd_std::priv::_DbgTraits<stlpd_std::priv::_Vector_nonconst_traits<es::Port*,
es::Port**> > >,
stlpd_std::priv::_DBG_iter<stlpd_std::priv::_NonDbg_vector<es::Port*,
stlpd_std::allocator<es::Port*> >,
stlpd_std::priv::_DbgTraits<stlpd_std::priv::_Vector_nonconst_traits<es::Port*,
es::Port**> > >, au::Delete) (_algo.h:61)                                       
==24977==    by 0x20F99CB4: es::Instance::~Instance() (esInstance.cpp:104)
==24977==    by 0x20F7EAF5: es::EdifInstance::~EdifInstance()
(esEdifInstance.cpp:27)
==24977==    by 0x20F7D61C: es::EdifBlackInstance::~EdifBlackInstance()
(esEdifBlackInstance.cpp:21)
--
==24977== Invalid write of size 1
==24977==    at 0x327AA0F6E5: _dl_allocate_tls_init (in /lib64/ld-2.5.so)
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)
==24977==    by 0x54D2A33:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperINS_8functionIFvvEEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D27F4: _ZN2ts10MakeThreadERKN5boost8functionIFvvEEE
(tsMain.cpp:339)
--
==24977== Invalid write of size 8
==24977==    at 0x327AA0F6D2: _dl_allocate_tls_init (in /lib64/ld-2.5.so)
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)
==24977==    by 0x54D2A33:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperINS_8functionIFvvEEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D27F4: _ZN2ts10MakeThreadERKN5boost8functionIFvvEEE
(tsMain.cpp:339)
--
==24977== Invalid read of size 8
==24977==    at 0x327AA0F575: _dl_tls_get_addr_soft (in /lib64/ld-2.5.so)
==24977==    by 0x327AF06039: dl_iterate_phdr (in /lib64/libc-2.5.so)
==24977==    by 0x4D5DBFE: _Unwind_Find_FDE (unwind-dw2-fde-glibc.c:417)
==24977==    by 0x4D5B042: uw_frame_state_for (unwind-dw2.c:1128)
==24977==    by 0x4D5BB3A: _Unwind_Backtrace (unwind.inc:290)
--
==24977== Invalid write of size 1
==24977==    at 0x327AA0F6E5: _dl_allocate_tls_init (in /lib64/ld-2.5.so)
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)
==24977==    by 0x54D2983:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperIN2au9Function0IvEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D2769: ts::MakeThread(au::Function0<void> const&)
(tsMain.cpp:333)
--
==24977== Invalid write of size 8
==24977==    at 0x327AA0F6D2: _dl_allocate_tls_init (in /lib64/ld-2.5.so)
==24977==    by 0x327BA06732: pthread_create@@GLIBC_2.2.5 (in
/lib64/libpthread-2.5.so)
==24977==    by 0x54E1D0B: boost::thread::start_thread() (thread.cpp:195)
==24977==    by 0x54D2983:
_ZN5boost6threadC1IRN2ts12_GLOBAL__N_118ErrorHandleWrapperIN2au9Function0IvEEEEEEOT_
(thread.hpp:155)
==24977==    by 0x54D2769: ts::MakeThread(au::Function0<void> const&)
(tsMain.cpp:333)


i have no idea how to track this more. any hints?


-- 
           Summary: possible wrong code at -O0.
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
GCC target triplet: x86_64-gnu-linux


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


             reply	other threads:[~2009-04-30 17:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30 17:45 pluto at agmk dot net [this message]
2009-11-12 10:39 ` [Bug other/39979] " pluto at agmk dot net
2010-04-17 13:59 ` [Bug other/39979] possible wrong code at all -0x levels pluto at agmk dot net
2010-04-18 13:34 ` pluto at agmk dot net
2010-04-18 13:44 ` pluto at agmk dot net
2010-04-18 18:30 ` rguenth at gcc dot gnu dot org
2010-04-18 19:01 ` pluto at agmk dot net
2010-04-18 19:04 ` pluto at agmk dot net
2010-04-18 20:28 ` pluto at agmk dot net
2010-04-18 20:32 ` rguenth at gcc dot gnu dot org
2010-04-18 20:33 ` rguenth at gcc dot gnu dot org
2010-04-19 10:09 ` [Bug other/39979] [4.4/4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
2010-04-19 11:44 ` pluto at agmk dot net
2010-04-19 11:45 ` pluto at agmk dot net
2010-04-20 12:21 ` pluto at agmk dot net
2010-04-30  8:57 ` jakub at gcc dot gnu dot org
2010-05-11 22:50 ` pluto at agmk dot net
2010-05-12 13:57 ` pluto at agmk dot net
2010-05-12 20:27 ` pluto at agmk dot net
2010-05-12 20:55 ` [Bug other/39979] [4.4/4.5/4.6 Regression] libsupc++(eh_globals.cc)/stlport TLS incompatibility pinskia at gcc dot gnu dot org
2010-05-13  9:14 ` pluto at agmk dot net
2010-05-13 10:25 ` redi at gcc dot gnu dot org
2010-05-13 10:46 ` pluto at agmk dot net
2010-05-13 11:29 ` redi at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-39979-7667@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).