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 via email to