This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to get more info about 'bad_function_call' ?


Jonathan Wakely wrote:
Look at the stack trace, find out why the std::function object you're
calling is empty at that point.

Forgot to include this, but the stack track shows that what I am
calling @ #7 is not empty.  IP = 4141c3, and 'this' is also nonzero.


Program terminated with signal SIGABRT, Aborted.
#0  0x0000003002035849 in __GI_raise (sig=sig@entry=6)
   at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#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  0x0000003006465145 in __gnu_cxx::__verbose_terminate_handler ()
   at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00000030064632e6 in __cxxabiv1::__terminate (handler=<optimized out>)
   at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:38
#4  0x0000003006463313 in std::terminate ()
   at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
#5  0x0000003006463532 in __cxxabiv1::__cxa_throw (obj=0x511040,
   tinfo=0x30066ef6c0 <typeinfo for std::bad_function_call>,
   dest=0x30064b4c30 <std::bad_function_call::~bad_function_call()>)
   at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:87
#6  0x00000030064b4bc2 in std::__throw_bad_function_call ()
   at ../../../../../libstdc++-v3/src/c++11/functexcept.cc:113
#7  0x00000000004141c3 in std::function<void ()>::operator()() const (
   this=this@entry=0x50ac58) at /usr/include/c++/4.8/functional:2470
#8 0x000000000041408c in Task::run (this=this@entry=0x50ac40) at ltask.cc:84
#9  0x0000000000413097 in Scheduler::sched_run (
   this=this@entry=0x7fff8a4ce900, wait_ms=wait_ms@entry=10,
   once=once@entry=false) at lsched.cc:65
#10 0x00000000004239d8 in OSstat::run (this=this@entry=0x7fff8a4ce670)
   at osstat.cc:97
#11 0x000000000041558c in main (argc=<optimized out>, argv=0x7fff8a4ceb98)
   at main.cc:20


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]