Hi all,
I'm experiencing random crash due to (it seems) the fact that in my
application I do use:

Wt::WApplication::instance()->processEvents();

the core say the following:

rogram terminated with signal 11, Segmentation fault.
#0  0x00007f9aa7663de1 in std::string::compare(char const*) const ()
from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x00007f9aa7663de1 in std::string::compare(char const*) const ()
from /usr/lib/libstdc++.so.6
#1  0x00007f9ab3452499 in operator==<char, std::char_traits<char>,
std::allocator<char> > (__lhs=..., __rhs=0xffffc000 <Address
0xffffc000 out of bounds>) at
/usr/include/c++/4.4/bits/basic_string.h:2270
#2  0x00007f9ab344ae42 in Wt::WebSession::handleRequest
(this=0x7f9a9800bac0, handler=...) at
/root/Installed/wt-3.1.7a/src/web/WebSession.C:1024


running the code with valgrind it seems that on that std::string
compare is read memory freed due to a call to processEvents.

this is what valgrind reports:

==30257== Thread 10:
==30257== Invalid read of size 8
==30257==    at 0x143A3DD6: std::string::compare(char const*) const
(in /usr/lib/libstdc++.so.6.0.13)
==30257==    by 0x87C0498: bool std::operator==<char,
std::char_traits<char>, std::allocator<char> >(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, char const*)
(basic_string.h:2270)
==30257==    by 0x87B8E41:
Wt::WebSession::handleRequest(Wt::WebSession::Handler&)
(WebSession.C:1024)
==30257==    by 0x87D4117:
Wt::WebController::handleAsyncRequest(Wt::WebRequest*)
(WebController.C:609)
==30257==    by 0x8BC127E:
http::server::WtReply::consumeRequestBody(char const*, char const*,
http::server::Request::State) (WtReply.C:175)
==30257==    by 0x8B81EF7:
http::server::RequestParser::parseBody(http::server::Request&,
boost::shared_ptr<http::server::Reply>, char const*&, char const*)
(RequestParser.C:137)
==30257==    by 0x8B66161: http::server::Connection::handleReadBody()
(Connection.C:168)
==30257==    by 0x8B67971:
http::server::Connection::handleReadRequest0() (Connection.C:116)
==30257==    by 0x8BB71D0:
boost::asio::detail::handler_queue::handler_wrapper<boost::asio::detail::binder2<boost::_bi::bind_t<void,
boost::_mfi::mf2<void, http::server::Connection,
boost::system::error_code const&, unsigned long>,
boost::_bi::list3<boost::_bi::value<boost::shared_ptr<http::server::Connection>
>, boost::arg<1> (*)(), boost::arg<2> (*)()> >,
boost::system::error_code, unsigned long>
>::do_call(boost::asio::detail::handler_queue::handler*)
(mem_fn_template.hpp:265)
==30257==    by 0x5C133EF:
boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false>
>::run(boost::system::error_code&) (handler_queue.hpp:39)
==30257==    by 0x8B82A80: http::server::Server::run() (io_service.ipp:58)
==30257==    by 0xBE01B6F: thread_proxy (in /usr/lib/libboost_thread.so.1.40.0)
==30257==  Address 0x395332f0 is 32 bytes inside a block of size 33 free'd
==30257==    at 0x4C26EFF: operator delete(void*) (vg_replace_malloc.c:387)
==30257==    by 0x143A5128: std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string() (in
/usr/lib/libstdc++.so.6.0.13)
==30257==    by 0x87B7CC3:
Wt::WebSession::propagateFormValues(Wt::WEvent const&, std::string
const&) (WebSession.C:1583)
==30257==    by 0x87BB99C: Wt::WebSession::notifySignal(Wt::WEvent
const&) (WebSession.C:1692)
==30257==    by 0x87BD7AB: Wt::WebSession::notify(Wt::WEvent const&)
(WebSession.C:1440)
==30257==    by 0x87BCC74: Wt::WebSession::doRecursiveEventLoop()
(WebSession.C:779)
==30257==    by 0x85D460B: Wt::WApplication::processEvents()
(WApplication.C:1328)
==30257==    by 0x7286AFD:
EssaWebInterfaceUpdater::showOwnerProgress()
(essawebinterfaceupdater.cpp:231)
==30257==    by 0x72870DD: EssaWebInterfaceUpdater::showRunning()
(essawebinterfaceupdater.cpp:112)
==30257==    by 0x728C84B: EssaWebInterface::timerLoop()
(essawebinterface.cpp:71)
==30257==    by 0x728CB80:
EssaWebInterface::EssaWebInterface(Wt::WEnvironment const&,
EssaWebInterfaceUpdater::Capabilities const&)
(essawebinterface.cpp:28)
==30257==    by 0x40CA85: createDemodulator(Wt::WEnvironment const&)
(webinterface.cpp:27)

Let me know if you need further informations.

Regards
Gaetano Mendola

-- 
cpp-today.blogspot.com

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to