Skip to content

Fix several places where an exception could be chained wrongly #7566

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

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

jepler
Copy link

@jepler jepler commented Feb 10, 2023

If an exception's chain or context can refer to a pointer from a different VM, a crash would typically result.

This couldn't turn up on UNIX testing because the VM is never torn down and rebuilt like it is on hardware.

Testing performed: Ran the original reproducer on a Feather RP2040 Scorpio and verified the reported behavior. Ran with the fix and it no longer reproduced.

While I think that WatchdogException could have led to similar behavior, and made fixes for this, I didn't test it. I did verify scenarios with KeyboardInterrupt and ReloadException are fixed.

Closes: #7565

jepler and others added 2 commits February 10, 2023 09:06
If an exception's chain or context can refer to a pointer from a different
VM, a crash would typically result.

This couldn't turn up on UNIX testing because the VM is never torn
down and rebuilt like it is on hardware.

Because in the 'static' case the GeneratorObject is now fully initialized
whenever it's raised, the initialization can be dropped, which reduces
the flash size slightly.
Closes: adafruit#7565
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@dhalbert dhalbert linked an issue Feb 10, 2023 that may be closed by this pull request
@dhalbert dhalbert merged commit 7071478 into adafruit:8.0.x Feb 10, 2023
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.

Board freeze on generator.close()
3 participants