[MacPorts] #35770: gcc ports should not include a C++ runtime

MacPorts noreply at macports.org
Mon Aug 27 03:59:47 PDT 2012


#35770: gcc ports should not include a C++ runtime
-----------------------------------+----------------------------------------
 Reporter:  jeremyhu@…             |       Owner:  jeremyhu@…                         
     Type:  defect                 |      Status:  new                                
 Priority:  Normal                 |   Milestone:                                     
Component:  ports                  |     Version:  2.1.2                              
 Keywords:  libstdc++              |        Port:  gcc43 gcc44 gcc45 gcc46 gcc47 gcc48
-----------------------------------+----------------------------------------

Comment(by help@…):

 Reposting my comment from #34288:
 > Several libstdc++ do not coexist well inside one process. I get
 backtraces like that when compiling with macports gcc46:
 >
 {{{
 malloc: *** error for object 0x10151e500: pointer being freed was not
 allocated

 #0  0x00007fff8eddf588 in malloc_error_break ()
 #1  0x00007fff8ede0942 in free ()
 #2  0x00007fff90154cf5 in std::basic_stringbuf<char,
 std::char_traits<char>, std::allocator<char> >::overflow ()
 #3  0x00007fff9015898e in std::basic_streambuf<char,
 std::char_traits<char> >::xsputn ()
 #4  0x00000001014a8b45 in std::__ostream_insert<char,
 std::char_traits<char> > ()
 #5  0x00007fff7d9a7b80 in vtable for std::basic_stringbuf<char,
 std::char_traits<char>, std::allocator<char> > ()
 #6  0x00007fff90155c8e in std::basic_ostringstream<char,
 std::char_traits<char>, std::allocator<char> >::basic_ostringstream ()
 #7  0xed851f90058d48fb in ?? ()
 }}}
 > 0x00007fff addresses are from system /usr/lib/libstdc++.dylib and
 0x00000001 are from gcc's libstdc++. Two things are wrong here - they call
 each others functions and they try to free each others objects/memory
 regions. Basicly it's completely broken behaviour. It's a wonder that
 crashes happen so rarely.
 > Since there are system frameworks/libraries that are linked against
 /usr/lib/libstdc++ (and libc++, and libobjc), macports compilers should
 use system libstdc++ too and not include their own version of C++ runtime
 library.

-- 
Ticket URL: <https://trac.macports.org/ticket/35770#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list