-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: legacy-1.0.0-rc0
-
Component/s: Testing
Hello.
I'm using static instance of a class like this one:
class Storage {
private:
mongo::DBClientConnection _db;
};
At the beginning of my program execution I got an Segmentation fault exception in std::string::assign, raised from here:
_writeConcern = WriteConcern::acknowledged; (dbclient.cpp:1460).
As the order of initialization of global and static variables are undefined I imply that static instance of
static const WriteConcern acknowledged;
hadn't been initialized at this moment.
I've changed this line to
_writeConcern = WriteConcern();
and it solved the problem for me.
Compiler: g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1, --c++11=on