-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Improve BDT in L1Trigger/L1TMuonEndCap #47599
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
Conversation
cms-bot internal usage |
please test |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47599/44099
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
||
Node::~Node() { | ||
// Recursively delete all nodes in the tree. | ||
if (leftDaughter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: using the defaultly made Node(Node&&)
with this implementation of a destructor leads to double delete of leftDaughter
and rightDaughter
as the default Node(Node&&)
will not reset the pointers to nullptr
.
@@ -135,24 +121,14 @@ void Tree::findLeafs(Node* local_root, std::list<Node*>& tn) { | |||
findLeafs(local_root->getRightDaughter(), tn); | |||
} | |||
|
|||
Tree::Tree(Tree&& tree) { | |||
if (rootNode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the problem spotted by gcc 14. rootNode
is uninitialized at this point so the following line deletes some random address.
7e93e60
to
96be2a4
Compare
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47599/44100
|
A new Pull Request was created by @Dr15Jones for master. It involves the following packages:
@aloeliger, @epalencia can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
(just to remind, the code improved in this PR is uses substantial amount of memory as reported in #42526) |
+1 Size: This PR adds an extra 36KB to repository Comparison SummarySummary:
|
Hello @Dr15Jones -- @quinnanm and I are starting to take over from @aloeliger as L1T OffSW coordinators. Are you planning on rebasing this PR to resolve the conflicts? I talked to @eyigitba who said the EMTF team would test custom BDT loading with your modifications. |
I can rebase |
- fixed memory corruption problems which could lead to double deletes or deletion of random memory locations - memory handling now done via std::unique_ptr - improved const correctness
96be2a4
to
759c430
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47599/44149 |
Pull request #47599 was updated. @BenjaminRS, @cmsbuild, @quinnanm can you please check and sign again. |
please test |
+1 Size: This PR adds an extra 20KB to repository The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
You can see more details here: Comparison SummarySummary:
|
+l1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @rappoccio, @mandrenguyen, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This deletion of memory coming from an uninitialized pointer was found by gcc 14.
PR validation:
Code compiles and local tests pass.
resolves cms-sw/framework-team#1307