-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash under MSVC (VS 2015 update 3) #41
Comments
Interesting... thanks for the report. Looks scary! I'll try to get around to looking at this soon! |
I'm getting the same problem too. This is annoying as I'm stuck. Before using I'm also using Visual Studio 2015 Update 3. |
Took some time to look into this today. It seems like the offending commit is 4bfed80, where I made the jump tables to be global variables. It looks like the jump tables aren't initialized while the Will need to think about how to fix this... |
@mpark Thank you so much for your time. I appreciate it. I'm on a big project and being stuck each time I try a variant lib is not a good thing :(
|
Reduced test case:
|
|
I'm getting this error as well with 1.3.0 variant.hpp:
with a simple assignment here. I can try to reduce it, but it looks the same as the above. Works fine on MacOS X and Linux, fails with VS2015.
Retesting with 1.2.2, it works correctly and there's no segfault. Edit: Just to comment on the use of global jump tables, my code is constructing and assigning the variant inside a static (googletest test discovery and registration) before |
Fixed by 1896bd5 |
When we have a global object that contains a variant instance that stores a std::unique_ptr the variant creation crashes the program. I tried to illustrate the minimal example and provide a stacktrace of the crash. Am I missing something? I don't think the code does anything illegal?
Crash occurs on MSVC (GCC does not crash);
Callstack:
Repro:
The text was updated successfully, but these errors were encountered: