Skip to content
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: segfault in SerialChooserController #25969

Merged
merged 2 commits into from
Oct 19, 2020
Merged

fix: segfault in SerialChooserController #25969

merged 2 commits into from
Oct 19, 2020

Conversation

jkleinsc
Copy link
Contributor

Description of Change

This fixes #25781. The segfault was caused by the fact that the ScopedObserver on the SerialChooserController was trying to call RemovePortObserver on a SerialChooserContext that had already been destroyed.

Since this segfault was happening sporadically, I modified testing to run through the serial tests 100 times until it errored out.
Here's a test run of it segfaulting before the fix was applied:
https://app.circleci.com/pipelines/github/electron/electron/30787/workflows/9b8b67bb-e324-47b4-a9f4-c1a29dec83b9/jobs/678333

And here is a test run after the fix where it successfully ran serial port tests 100 times without segfault:
https://app.circleci.com/pipelines/github/electron/electron/31155/workflows/1fae9ecb-008e-4e2d-8ad9-cade5c72ac2a

Checklist

Release Notes

Notes: Fixed crash while exiting Electron after using the Web Serial API.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 15, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 16, 2020
@jkleinsc
Copy link
Contributor Author

Merging as WOA failure is known flake unrelated to this PR.

@jkleinsc jkleinsc merged commit 87d3f35 into master Oct 19, 2020
@release-clerk
Copy link

release-clerk bot commented Oct 19, 2020

Release Notes Persisted

Fixed crash while exiting Electron after using the Web Serial API.

@jkleinsc jkleinsc deleted the fixup-serialport branch October 19, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault in SerialChooserController
2 participants