Overview
Features
Download
Documentation
Community
Add-Ons & Services

Valgrind false alarm

Please post support and help requests here.

Valgrind false alarm

Postby helthans » 10 Jul 2014, 14:36

I have run valgrind on my C++ application which uses Poco. I get the below output, which I believe is a false alarm, but I just wanted to be sure if I am correct

Code: Select all
39 bytes in 1 blocks are possibly lost in loss record 7,983 of 12,656
  in PocoWebServerModule::PocoWebServerPlugin::startServer() in src/pocowebserverplugin/pocowebserverplugin.cpp:112
  1: operator new(unsigned int) in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so
  2: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
  3: std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
  4: std::string::reserve(unsigned int) in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
  5: std::string::append(std::string const&) in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
  6: Poco::Net::TCPServer::threadName(Poco::Net::ServerSocket const&) in external_tools/poco-1.5.2/lib_linux/lib/libPocoNet.so.22
  7: Poco::Net::TCPServer::TCPServer(Poco::SharedPtr<Poco::Net::TCPServerConnectionFactory, Poco::ReferenceCounter, Poco::ReleasePolicy><Poco::Net::TCPServerConnectionFactory> >, Poco::Net::ServerSocket const&, Poco::AutoPtr<Poco::Net::TCPServerParams>) in external_tools/poco-1.5.2/lib_linux/lib/libPocoNet.so.22
  8: Poco::Net::HTTPServer::HTTPServer(Poco::SharedPtr<Poco::Net::HTTPRequestHandlerFactory, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Net::HTTPRequestHandlerFactory> >, Poco::Net::ServerSocket const&, Poco::AutoPtr<Poco::Net::HTTPServerParams>) in external_tools/poco-1.5.2/lib_linux/lib/libPocoNet.so.22
  9: PocoWebServerModule::PocoWebServerPlugin::startServer() in src/pocowebserverplugin/pocowebserverplugin.cpp:112


In #9 it refers to the following snippet in my code (lines numbers shown in []):
Code: Select all
[106]    Poco::Net::SocketAddress addr("10.0.0.101",8080);
[107]    try {
[108]        Poco::Net::HTTPRequestHandlerFactory::Ptr pFactory = new RequestHandlerFactory;
[109]        Poco::Net::HTTPServerParams::Ptr pParams = new Poco::Net::HTTPServerParams;
[110]        m_server = new Poco::Net::HTTPServer(pFactory,
[111]                                             Poco::Net::ServerSocket(addr),
[112]                                             pParams);
[113]
[114]        m_server->start();


So Valgrind points to pParams. Any issues in the way I use this parameter?
helthans
 
Posts: 14
Joined: 05 Nov 2013, 15:07

Return to Support

Who is online

Users browsing this forum: No registered users and 5 guests