Use std::unique_ptr for samplers_ and likelihood_in_iter_#4551
Merged
sharwell merged 1 commit intodotnet:masterfrom Dec 9, 2019
Merged
Use std::unique_ptr for samplers_ and likelihood_in_iter_#4551sharwell merged 1 commit intodotnet:masterfrom
sharwell merged 1 commit intodotnet:masterfrom
Conversation
Closed
sharwell
commented
Dec 8, 2019
Comment on lines
-132
to
-136
| for (int i = 0; i < num_threads_; ++i) | ||
| { | ||
| delete samplers_[i]; | ||
| } | ||
| delete[] samplers_; |
Contributor
Author
There was a problem hiding this comment.
📝 This block was responsible for some of the crashes observed in CI, and especially the crashes prior to 0cbfa54. The destructor is missing a null check for samplers_.
codemzs
approved these changes
Dec 8, 2019
55f3126 to
f7ddd8b
Compare
Codecov Report
@@ Coverage Diff @@
## master #4551 +/- ##
==========================================
- Coverage 75.11% 75.1% -0.01%
==========================================
Files 908 908
Lines 160163 160163
Branches 17250 17250
==========================================
- Hits 120301 120296 -5
- Misses 35042 35045 +3
- Partials 4820 4822 +2
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an access violation in native code if
LdaEngineis deleted beforesamplers_is initialized.