Skip to content

Don't NORETURN MP_WEAK functions #10275

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 1 commit into from
Apr 21, 2025

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Apr 21, 2025

As described in #10274, #10260 added NORETURN to some MP_WEAK functions, which were not always NORETURN. Only the NotImplementedError versions of these functions were NORETURN. This caused crashes.

Note there was already one MP_WEAK NORETURN functions, common_hal_socketpool_socketpool_raise_gaierror_noname(), but it always raises, so it's always NORETURN.

Tested with #10271 (comment) test script and no longer crashes.

@dhalbert dhalbert requested a review from tannewt April 21, 2025 02:29
Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

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

Change looks good to me. Did not test on hardware.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit 68e8136 into adafruit:main Apr 21, 2025
614 checks passed
@dhalbert dhalbert deleted the dont-no-return-weak-functions branch April 21, 2025 18:20
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.

Crashes since #10260
3 participants