fix: add uv_loop_close when object release to fix crash - #35322
Conversation
|
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
Release Notes Persisted
|
|
I have automatically backported this PR to "21-x-y", please check out #35336 |
|
I have automatically backported this PR to "19-x-y", please check out #35337 |
|
I have automatically backported this PR to "20-x-y", please check out #35338 |
|
/trop run backport-to 18-x-y |
|
The backport process for this PR has been manually initiated - sending your PR to |
|
I have automatically backported this PR to "18-x-y", please check out #35340 |
|
This seems to have broken in Mac with WebWorkers destructing. Will look at posting dump and repro |
Co-authored-by: yangzuohui <yangzuohui@bytedance.com>
Co-authored-by: yangzuohui <yangzuohui@bytedance.com>
Description of Change
stop_and_close_uv_loop add call uv_loop_close.
In the destructor of NodeBindings, stop_and_close_uv_loop is called, but stop_and_close_uv_loop does not call uv_loop_close. After NodeBindings are destructed, libuv still holds the member objects of NodeBindings. When power resume, libuv enumerates all loops, and will accesses a pointer that has been released.
as issue #32926
About npm test in checklist. Before I modified the code, 15 cases could not pass on my computer. After I modified, the failed cases did not increase, so there should be no problem with npm test.
Resolves #32926
Checklist
npm testpassesRelease Notes
Notes: Fixed crash in renderer when resuming system from sleep