On 16/07/2016 7:02 a.m., Alex Rousskov wrote: > > * After r14735 (Replaced TidyPointer with std::unique_ptr), Squid cannot > start due to an "std::bad_function_call" exception. > ... > ---------- stack traces ------------ >> g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 > > * bad_function_call exception on startup (tested with r14735, r14737, > r14740, r14742, r14744): > >> terminate called after throwing an instance of 'std::bad_function_call' >> what(): bad_function_call >> >> Program received signal SIGABRT, Aborted. ... >> #8 0x00007ffff63a5a95 in __cxa_throw () >> from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 >> #9 0x00007ffff63f7aa2 in std::__throw_bad_function_call() () >> from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 >> #10 0x000000000099b53e in std::function<int (bio_st*)>::operator()(bio_st*) >> const (this=0x7fffffffe0e0, __args#0=0x101d8b0) >> at /usr/include/c++/4.8/functional:2463 >> #11 0x000000000099ae87 in std::unique_ptr<bio_st, std::function<int >> (bio_st*)> >::~unique_ptr() (this=0x7fffffffe0e0, __in_chrg=<optimized out>) >> at /usr/include/c++/4.8/bits/unique_ptr.h:184 >> #12 0x00000000009a8fa7 in Ssl::readSslPrivateKey ( >> keyFilename=0xff75a0 "/home/tester/testing/ssl/CA-priv+pub.pem", >> passwd_callback=0x0) at gadgets.cc:672 >
This seems to mean the functor being given to unique_ptr is not right. for BIO_Pointer. One odd difference between BIO_Pointer and others is that the BIO_free function we give to unique_ptr returns an int. Others are void functions. So, Alex; does replacing "BIO_free" with "BIO_vfree" in the ssl/gadgets.h definition of BIO_POinter fix this one? Amos _______________________________________________ squid-dev mailing list [email protected] http://lists.squid-cache.org/listinfo/squid-dev
