why are calls to libstdc++ being handled by python?

Linda A. Walsh gcc@tlinx.org
Thu Jul 10 12:19:00 GMT 2014


This looks very odd.

I can't believe it is what it appears to be, but I got
"another" core dump (unstable development work),
but unlike any other core dump, this one went back
3x as many frames and had python tracings in it.

Things looked fine (though it is a bit long) until
it got to frames 15, 16, where python error messages
were included.

AFAIK, there is no python in this program -- I thought
it was pure C++ (or bastard C posing as C++)..

Is this even possible?

#0  0x0000003002035849 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x0000003002036cd8 in __GI_abort () at abort.c:89
#2  0x0000003002074114 in __libc_message (do_abort=do_abort@entry=2,
    fmt=fmt@entry=0x300216a220 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x000000300207996e in malloc_printerr (action=3,
    str=0x300216a3e0 "free(): invalid next size (fast)", ptr=<optimized 
out>)
    at malloc.c:4916
#4  0x000000300207a647 in _int_free (av=<optimized out>, p=0x23a23b0,
    have_lock=0) at malloc.c:3772
#5  0x000000000041b3d2 in _M_dispose (__a=..., this=<optimized out>)
    at /usr/include/c++/4.8/bits/basic_string.h:249
#6  ~basic_string (this=0x22e9af0, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8/bits/basic_string.h:539
#7  ~pair (this=0x22e9af0, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8/bits/stl_pair.h:96
#8  ~_Rb_tree_node (this=0x22e9ad0, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8/bits/stl_tree.h:131
#9  destroy<std::_Rb_tree_node<std::pair<std::basic_string<char> const, 
unsigned long> > > (__p=0x22e9ad0, this=0x22e9988)
    at /usr/include/c++/4.8/ext/new_allocator.h:124
#10 _M_destroy_node (__p=0x22e9ad0, this=0x22e9988)
    at /usr/include/c++/4.8/bits/stl_tree.h:421
#11 std::_Rb_tree<std::string, std::pair<std::string const, unsigned 
long>, std::_Select1st<std::pair<std::string const, unsigned long> >, 
std::less<std::string>, std::allocator<std::pair<std::string const, 
unsigned long> > >::_M_erase (
    this=this@entry=0x22e9988, __x=0x22e9ad0)
    at /usr/include/c++/4.8/bits/stl_tree.h:1127
#12 0x000000000041b38d in std::_Rb_tree<std::string, 
std::pair<std::string const, unsigned long>, 
std::_Select1st<std::pair<std::string const, unsigned long> >, 
std::less<std::string>, std::allocator<std::pair<std::string const, 
unsigned long> > >::_M_erase (this=this@entry=0x22e9988, __x=0x22e9d80)
    at /usr/include/c++/4.8/bits/stl_tree.h:1125
---Type <return> to continue, or q <return> to quit---
#13 0x000000000041b38d in std::_Rb_tree<std::string, 
std::pair<std::string const, unsigned long>, 
std::_Select1st<std::pair<std::string const, unsigned long> >, 
std::less<std::string>, std::allocator<std::pair<std::string const, 
unsigned long> > >::_M_erase (this=this@entry=0x22e9988, __x=0x22e9b10)
    at /usr/include/c++/4.8/bits/stl_tree.h:1125
#14 0x000000000041b65c in clear (this=0x22e9988)
    at /usr/include/c++/4.8/bits/stl_tree.h:860
#15 std::_Rb_tree<std::string, std::pair<std::string const, unsigned 
long>, std::_Select1st<std::pair<std::string const, unsigned long> >, 
std::less<std::string>, std::allocator<std::pair<std::string const, 
unsigned long> > >::operator= (
    this=this@entry=0x22e9988, __x=...)
    at /usr/include/c++/4.8/bits/stl_tree.h:993
Python Exception <type 'exceptions.IndexError'> list index out of range:
#16 0x000000000041a282 in operator= (__x=std::map with 5 elements,
    this=0x22e9988) at /usr/include/c++/4.8/bits/stl_map.h:266
Python Exception <type 'exceptions.IndexError'> list index out of range:
#17 DiskMeter::update_info (this=this@entry=0x22e97a0,
Python Exception <type 'exceptions.IndexError'> list index out of range:
    reads=std::map with 5 elements, writes=std::map with 5 elements)
    at linux/diskmeter.cc:219
#18 0x000000000041ac2a in DiskMeter::getsysfsdiskinfo (
    this=this@entry=0x22e97a0) at linux/diskmeter.cc:303
#19 0x000000000041b0de in DiskMeter::getdiskinfo (this=this@entry=0x22e97a0)
    at linux/diskmeter.cc:63
#20 0x000000000041b353 in DiskMeter::checkevent (this=0x22e97a0)
    at linux/diskmeter.cc:69
#21 0x0000000000418ee0 in operator() (__closure=<optimized out>)
    at linux/diskmeter.cc:42
#22 std::_Function_handler<void(), DiskMeter::DiskMeter(XOSView*, 
uint64_t)::__lambda0>::_M_invoke(const std::_Any_data &) (__functor=...)
    at /usr/include/c++/4.8/functional:2071
#23 0x000000000040df86 in std::function<void ()>::operator()() const (
    this=this@entry=0x22e97a8) at /usr/include/c++/4.8/functional:2468
#24 0x000000000040df2d in Task::run (this=this@entry=0x22e97a8) at 
ltask.cc:89
#25 0x000000000040d5fb in Scheduler::sched_run (
    this=this@entry=0x7fff64cb5d78, wait_ms=wait_ms@entry=100,
    once=once@entry=false) at lsched.cc:66
---Type <return> to continue, or q <return> to quit---
#26 0x000000000040e7f8 in XOSView::run (this=this@entry=0x7fff64cb5ae0)
    at xosview.cc:181
#27 0x000000000040badd in main (argc=<optimized out>, argv=0x7fff64cb5fd8)
    at main.cc:20



More information about the Libstdc++ mailing list