Actions
Bug #3928
closedWt::WServer::postAll can SEGFAULT in constructor
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.
Updated by Koen Deforche over 9 years ago
- Status changed from New to InProgress
- Assignee set to Benoit Daccache
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche about 9 years ago
- Status changed from Resolved to Closed
Actions