[CXX-324] Static initialization of mongo::DBClientConnection Created: 01/Sep/14 Updated: 23/Oct/14 Resolved: 09/Sep/14 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Testing |
| Affects Version/s: | legacy-1.0.0-rc0 |
| Fix Version/s: | legacy-1.0.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Artyom | Assignee: | Tyler Brock |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | crash, driver, legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Hello. At the beginning of my program execution I got an Segmentation fault exception in std::string::assign, raised from here: As the order of initialization of global and static variables are undefined I imply that static instance of Compiler: g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1, --c++11=on |
| Comments |
| Comment by Githook User [ 09/Sep/14 ] |
|
Author: {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}Message: Revert " This reverts commit aadc8d081511d96e05cf8e819203d0593b276c4f. |
| Comment by Githook User [ 09/Sep/14 ] |
|
Author: {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}Message: Revert " This reverts commit 211b1f49f7ec9adaf1419d075b05d9d0404e12f0. |
| Comment by Tyler Brock [ 09/Sep/14 ] |
|
Hey Artyom, unfortunately we had to re-think this one and revert it. The C++ driver cannot be used before mongo::client::initialize() has been invoked so users of the driver cannot and should not have static objects that use the driver in any way before entering main (presumably where initialize is called). |
| Comment by Githook User [ 03/Sep/14 ] |
|
Author: {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}Message: |
| Comment by Githook User [ 03/Sep/14 ] |
|
Author: {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}Message: |
| Comment by Tyler Brock [ 03/Sep/14 ] |
| Comment by Tyler Brock [ 01/Sep/14 ] |
|
Hey Artyom, thanks for filing the ticket. I am going to take a look tomorrow but it sounds like you are correct and that this should be fixed. |