Project

General

Profile

Actions

Bug #3928

closed

Wt::WServer::postAll can SEGFAULT in constructor

Added by Drew Dormann over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
High
Assignee:
Benoit Daccache
Target version:
Start date:
03/29/2015
Due date:
% Done:

0%

Estimated time:

Description

I discovered a reproducible crash in Wt 3.3.4 by (indirectly) calling postAll() from a derived constructor.

I believe that this bug is unique to WServer instances constructed as WServer::WServer(const std::string& applicationPath, const std::string& wtConfigurationFile) as that constructor does not call setServerConfiguration(), which means webController_ will be a NULL pointer.

Here is a minimal program that will SEGFAULT. (Tested in Linux, gcc 4.9.2)

#include <Wt/WServer>

class Server : public Wt::WServer
{
public:
    Server() : Wt::WServer{ ".", "wt_config.xml" }
    {
        postAll( []{} ); // (A do-nothing lambda)
    }
};

int main()
{
    Server my_server;
}

Within the constructor, I wouldn't expect any sessions to be active, therefore I would expect a call to postAll to be a no-op.

Actions #1

Updated by Koen Deforche over 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Benoit Daccache
Actions #2

Updated by Benoit Daccache over 9 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions #4

Updated by Koen Deforche about 9 years ago

  • Target version set to 3.3.5
Actions

Also available in: Atom PDF