Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
Description
I’ve tried building a DEBUG version of the mongo-cxx-driver library on linux, and linking it against an app that defines GLIBCXX_DEBUG.
This app then crashes when I call mongo::client::GlobalInstance:: GlobalInstance()
The issue is most easily seen by printing out
sizeof(mongo::DBClientConnection) = 320
in the mongo code, and
sizeof(mongo::DBClientConnection) = 344
in my calling code (which defines GLIBCXX_DEBUG).
I think what is needed is some SCONS magic to pass along the GLIBCXX_DEBUG flag to the c++ compiler. I believe this should be done automatically when you define dbg=on, but given your history, that poses problems with backward compatability. At the very least you should provide a simple way to pass along GLIBCXX_DEBUG to the C++ compiler in this case.