Skip to content
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

Fix Test failing on GCC and Clang #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ObiWahn
Copy link

@ObiWahn ObiWahn commented Dec 27, 2019

I hope this change resolves the error:

-      val() = std::move(temp);
+      new (valptr()) T(std::move(temp));

@ObiWahn
Copy link
Author

ObiWahn commented Dec 28, 2019

FIX: #65

@s3cur3
Copy link

s3cur3 commented Jul 23, 2020

This fixed a crash in -O3 builds for us when a std::shared_ptr was the expected type. I'm... really, really not sure why that is... it looks like maybe the implementation of the assignment operator was decrementing the ref count down to zero in the shared_ptr's destructor, freeing the underlying object, then trying to re-increment the ref count?

In any case, thanks @ObiWahn!

@ObiWahn
Copy link
Author

ObiWahn commented Jul 23, 2020

@TartanLlama what is required to get this merged? Do you want me to revert the whitespace changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants