-
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 shutdown ordering in TestDnssd. #26024
Fix shutdown ordering in TestDnssd. #26024
Conversation
For init it does, in order: PlatformMgr().InitChipStack(), ChipDnssdInit, RunEventLoop. For shutdown it should do them in exactly the opposite order. Fixes project-chip#26023
PR #26024: Size comparison from 8676d06 to 48bc4e9 Decreases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
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.
If you've got some time, please also take a look at the exit(0)
in the HandleResolve()
function. When fixing this issue: #25466 I had to comment out lines 42-44, otherwise, in some test runs Shutdown()
was called twice which has caused "strange" errors due to use after free/double free issue. If I remember correctly the exit(0)
triggers handler registered by atexit()
which also does something with platform shutdown. However, I've got no time to dive dipper into that.
There's no atexit handler like that in the unit tests. |
Yes, it's not in the unit test. I've got some troubles to determine where the handler was registered, but I do remember that it was "atexit() > ... > Shutdown() > ...." in the callstack... |
For init it does, in order: PlatformMgr().InitChipStack(), ChipDnssdInit, RunEventLoop.
For shutdown it should do them in exactly the opposite order.
Fixes #26023