-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix the ReadClient destructor to call OnDeallocatePaths. #21660
Merged
woody-apple
merged 1 commit into
project-chip:master
from
bzbarsky-apple:fix-read-client-cleanup
Aug 16, 2022
Merged
Fix the ReadClient destructor to call OnDeallocatePaths. #21660
woody-apple
merged 1 commit into
project-chip:master
from
bzbarsky-apple:fix-read-client-cleanup
Aug 16, 2022
Conversation
This file contains 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
pullapprove
bot
requested review from
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
erjiaqing,
franck-apple,
gjc13,
harsha-rajendran,
hawk248,
isiu-apple,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
kghost,
lazarkov,
LuDuda,
msandstedt,
mspang,
rgoliver,
robszewczyk and
saurabhst
August 5, 2022 04:48
bzbarsky-apple
force-pushed
the
fix-read-client-cleanup
branch
from
August 5, 2022 04:58
2b95cbf
to
d8ef26c
Compare
PR #21660: Size comparison from daf5030 to d8ef26c Increases (18 builds for bl602, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
Full report (18 builds for bl602, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
|
bzbarsky-apple
force-pushed
the
fix-read-client-cleanup
branch
from
August 5, 2022 05:36
d8ef26c
to
0e3aed1
Compare
PR #21660: Size comparison from daf5030 to 0e3aed1 Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Decreases (6 builds for cc13x2_26x2)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
bzbarsky-apple
force-pushed
the
fix-read-client-cleanup
branch
from
August 5, 2022 07:31
0e3aed1
to
9274ebb
Compare
PR #21660: Size comparison from 753415d to 9274ebb Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
Decreases (6 builds for cc13x2_26x2)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
mrjerryjohns
reviewed
Aug 5, 2022
mrjerryjohns
reviewed
Aug 5, 2022
woody-apple
approved these changes
Aug 9, 2022
This is actually somewhat dangerous, because there is a good chance ~ReadClient is running from under the destructor of the ReadClient::Callback and we are invoking a virtual method on the callback. But this is the only way to ensure we don't leak. ReadClient::Callback implementations need to be able to handle this. Fixes project-chip#21658
woody-apple
force-pushed
the
fix-read-client-cleanup
branch
from
August 10, 2022 05:50
9274ebb
to
b7718f3
Compare
PR #21660: Size comparison from 397d642 to b7718f3 Increases (42 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
Decreases (6 builds for cc13x2_26x2)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
Fast tracking given this has had enough time for review. |
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this pull request
Sep 1, 2022
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this pull request
Sep 2, 2022
bzbarsky-apple
added a commit
that referenced
this pull request
Sep 2, 2022
isiu-apple
pushed a commit
to isiu-apple/connectedhomeip
that referenced
this pull request
Sep 16, 2022
…p#21660) This is actually somewhat dangerous, because there is a good chance ~ReadClient is running from under the destructor of the ReadClient::Callback and we are invoking a virtual method on the callback. But this is the only way to ensure we don't leak. ReadClient::Callback implementations need to be able to handle this. Fixes project-chip#21658
isiu-apple
pushed a commit
to isiu-apple/connectedhomeip
that referenced
this pull request
Sep 16, 2022
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.
This is actually somewhat dangerous, because there is a good chance ~ReadClient
is running from under the destructor of the ReadClient::Callback and we are
invoking a virtual method on the callback. But this is the only way to ensure
we don't leak. ReadClient::Callback implementations need to be able to handle
this.
Fixes #21658
Problem
We never call OnDeallocatePaths if a ReadClient with auto-resubscribe is destroyed.
Change overview
Call it.
Testing
and at the interactive prompt run:
Without this PR it shows path leaks.