auto options = mtf::TestingServerConfiguration().the_options();
There are two significant objects created here:
1. a temporary TestingServerConfiguration
2. a named shared_ptr<Option>
the first is destroyed at the the end of the above statement, the second exists until the end of scope.
If we modify the code to name the TestingServerConfiguration (so that it exists until after "options" is deleted) then the crash stops happening.
This leads me to believe that setting the default value on the option (as mentioned above) is creating an object whose destructor is instantiated in the server-mesa-x11 module. (I'm not sure of the mechanism but, empirically, the library is unloaded by ~TestingServerConfiguration()).
In the test SetUp() we have the line:
auto options = mtf::TestingSer verConfiguratio n().the_ options( );
There are two significant objects created here:
1. a temporary TestingServerCo nfiguration
2. a named shared_ptr<Option>
the first is destroyed at the the end of the above statement, the second exists until the end of scope.
If we modify the code to name the TestingServerCo nfiguration (so that it exists until after "options" is deleted) then the crash stops happening.
This leads me to believe that setting the default value on the option (as mentioned above) is creating an object whose destructor is instantiated in the server-mesa-x11 module. (I'm not sure of the mechanism but, empirically, the library is unloaded by ~TestingServerC onfiguration( )).