-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: remove catch-all HandleScope #22531
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
Annotated crash from asan:
|
This reverts commit 0e4b3a6.
4a7075d
to
bacba55
Compare
@zcbenz it looks like this triggered a UAF related to the "running JS in the WebContents destructor" patch you made earlier. I'm not exactly sure yet what the right way to resolve it is, but you might have some insight. |
@nornagon Current master is crashing when running tests after last Chromium upgrade due to memory corruption, for example https://circleci.com/gh/electron/electron/486317?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link. We should probably solve it first and then see if this branch still crashes. I looked into the crash yesterday but did not make much progress, I was hoping #22514 to make things better. |
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.
👍
There are probably a few remaining things that tests failed to catch, but hopefully we'll pick them up during alpha/beta. |
Release Notes Persisted
|
Description of Change
This removes the catch-all HandleScope in JavascriptEnvironment. This could cause memory leaks when creating v8 objects in C++ without an explicit HandleScope on the stack. Now, such usage will cause a crash.
Checklist
npm test
passesRelease Notes
Notes: Fixed several memory leaks related to V8 handles not being properly scoped.