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

Correct potential memory smasher in GetAll #559

Merged
merged 5 commits into from Jun 12, 2015
Merged

Conversation

codemercenary
Copy link
Contributor

std::get_temporary_buffer does not guarantee sufficient space for allocations in the same way that new does. Use new here instead in order to ensure we do not smash memory during GetAll.

`std::get_temporary_buffer` does not guarantee sufficient space for allocations in the same way that `new` does.  Use `new` here instead in order to ensure we do not smash memory during `GetAll`.
@codemercenary
Copy link
Contributor Author

I couldn't get make_unique working on all platforms--but if it does, then sure, why not?

@jdonald
Copy link
Contributor

jdonald commented Jun 12, 2015

Ran valgrind on MultiPostHocIntroductionTest, MultiDecorateTest, UnsatDecTest which call GetAll(). Doesn't report any problems for this branch.

jdonald added a commit that referenced this pull request Jun 12, 2015
Correct potential memory smasher in GetAll
@jdonald jdonald merged commit 8a83dd1 into develop Jun 12, 2015
@jdonald jdonald deleted the bug-getallsmasher branch June 12, 2015 03:47
@codemercenary
Copy link
Contributor Author

Thanks @jdonald !

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.

None yet

4 participants