v622 Prevent Access of deleted object during hadd tear down#9027
Merged
pcanal merged 2 commits intoroot-project:v6-22-00-patchesfrom Sep 24, 2021
Merged
v622 Prevent Access of deleted object during hadd tear down#9027pcanal merged 2 commits intoroot-project:v6-22-00-patchesfrom
pcanal merged 2 commits intoroot-project:v6-22-00-patchesfrom
Conversation
|
Starting build on |
Delaying is no longer necessary since the introduction of TFriendElement::fOwnFile in commit 115203c
Call RecursiveRemove early in the TTree destructor (rather than last thing), to remove the tree from any list (like another TTree's list of clones) to avoid that the destructor's deletion of item (eg. the list of friends), provoke a call to this same TTree's RecursiveRemove which will try to call the RecursiveRemove on the item being deleted. An alternative would be to replace the pattern. `delete fFriends; fFriends = nullptr;` with `auto tmp = fFriends; fFriends = nullptr; delete tmp;` This fixes issue root-project#9017 where we had a tear down crash because: ~TTree call delete fFriends which call RecursiveRemove which reach another TTree's list of clone where its find the (original) TTree and call its RecursiveRemove which tries (and fail) to call RecursiveRemove on fFriends
de29e4f to
299c299
Compare
|
Starting build on |
|
Build failed on mac11.0/cxx17. Warnings:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prevent a TTree from calling its won RecursiveRemove.
This fixes issue #9017 where we had a tear down crash because: