You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one calls to_string( std::stacktrace::current() ); initially from a dynamic library (DLL), then this library fails to unload properly. In particular, global objects it in are not destroyed.
Command-line test case
DLL's code:
#include <iostream>
#include <stacktrace>
__declspec(dllexport) void findStacktrace() {
(void)to_string( std::stacktrace::current() ); //#1
}
struct A {
~A() { std::cout << "~A()\n"; } //this is not executed unless line #1 is commented
} a;
Main module code:
__declspec(dllimport) void findStacktrace();
int main() {
findStacktrace();
}
Describe the bug
If one calls
to_string( std::stacktrace::current() );
initially from a dynamic library (DLL), then this library fails to unload properly. In particular, global objects it in are not destroyed.Command-line test case
DLL's code:
Main module code:
Full code and project files:
StacktraceDll.zip
Expected behavior
~A()
destructor must be called irrespectively of previous calls tostd::stacktrace
.STL version
Additional context
Please note that
to_string( boost::stacktrace::stacktrace() )
works fine in this scenario.The text was updated successfully, but these errors were encountered: