Skip to content

Conversation

@sharwell
Copy link
Contributor

@sharwell sharwell commented Dec 8, 2019

Fixes an access violation in native code if LdaEngine is deleted before samplers_ is initialized.

@sharwell sharwell requested a review from a team as a code owner December 8, 2019 20:49
@sharwell sharwell mentioned this pull request Dec 8, 2019
Comment on lines -132 to -136
for (int i = 0; i < num_threads_; ++i)
{
delete samplers_[i];
}
delete[] samplers_;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 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_.

@codecov
Copy link

codecov bot commented Dec 9, 2019

Codecov Report

Merging #4551 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            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
Flag Coverage Δ
#Debug 75.1% <ø> (-0.01%) ⬇️
#production 70.51% <ø> (-0.01%) ⬇️
#test 90.3% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...c/Microsoft.ML.FastTree/Utils/ThreadTaskManager.cs 79.48% <0%> (-20.52%) ⬇️
src/Microsoft.ML.Core/Data/ProgressReporter.cs 70.95% <0%> (-6.99%) ⬇️
....ML.AutoML/PipelineSuggesters/PipelineSuggester.cs 79.83% <0%> (ø) ⬆️
...soft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs 85.31% <0%> (+0.2%) ⬆️
...soft.ML.Transforms/Text/WordEmbeddingsExtractor.cs 87.52% <0%> (+1.13%) ⬆️
src/Microsoft.ML.AutoML/Sweepers/Parameters.cs 82.2% <0%> (+4.23%) ⬆️
src/Microsoft.ML.AutoML/Sweepers/ISweeper.cs 67.08% <0%> (+7.59%) ⬆️

@sharwell sharwell merged commit 2f24ed9 into dotnet:master Dec 9, 2019
@sharwell sharwell deleted the unique-ptr-2 branch December 9, 2019 03:06
@ghost ghost locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants