-
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
[AddressResolver] Add a check in shutdown to avoid some crashes if so… #35824
[AddressResolver] Add a check in shutdown to avoid some crashes if so… #35824
Conversation
…meone calls it multiple times
Review changes with SemanticDiff. |
Co-authored-by: Andrei Litvin <[email protected]>
@vivien-apple could you update the summary to describe "what" applications do this? I can see an argument for the code to be tolerant to multiple shutdowns, however I would also have an argument that application behaviour should be well controlled and known. If they call shutdown multiple times, would they maybe call init multiple times? Should we guard the init as well or should we add logging when this out of order/extra calls are made? |
PR #35824: Size comparison from f509f67 to 8e2ed1d Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
project-chip#35824) * [AddressResolver] Add a check in shutdown to avoid some crashes if someone calls it multiple times * Apply suggestion from code review. Co-authored-by: Andrei Litvin <[email protected]> --------- Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Andrei Litvin <[email protected]>
…meone calls it multiple times
Problem
Some apps calls multiple times
Shutdown
on the resolver and it crashes a bit after since it tries to access a null pointer. It won't hurt much to just null checkmSystemLayer
and prevent doing the shutdown twice.