-
-
Notifications
You must be signed in to change notification settings - Fork 101
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 SEGFAULTs under Python 3.12 by using public C-API #929
Fix SEGFAULTs under Python 3.12 by using public C-API #929
Conversation
I'm extremely confident in my ability to build a reproducer for this problem for systems running Nix on Darwin, and moderately confident in my ability to build a reproducer for systems running Nix on Linux. I have not at all investigated reproduction of the issue without Nix, so I'm not really sure what a test suite addition would look like. |
@charles-dyfis-net plz update the change note from #909 and add a symlink with this PR number in it. Meanwhile, I want to figure out why it works without this change. |
Implemented as an extension of aio-libs#909, which disabled METH_FASTCALL on Python 3.13 and later. Fixes aio-libs#926.
ad11386
to
1341d01
Compare
Implemented as an extension of aio-libs#909, which disabled METH_FASTCALL on Python 3.13 and later. Fixes aio-libs#926.
1341d01
to
4241d0a
Compare
4241d0a
to
a24e0ba
Compare
Implemented, I thought -- a24e0ba appends to
I'll be curious what you learn. |
The not doesn't treat edits to old fragments the same. But if you add a symlink, it should notice that. |
Could you try adding a test with the suggestion from #926 (comment) and check if it fails w/o this patch and succeeds with it? Also, maybe test with the code pre #909. |
a24e0ba
to
45d6942
Compare
That test is in fact helpful! Without this change, it results in a segfault:
|
5176ee3
to
8884206
Compare
@charles-dyfis-net thanks! Could you also run that test against |
FYI there's a text file with allowed words in the docs dir. You can add "GCC" there to make the linting succeed. |
8884206
to
ed0cf16
Compare
The test passes on 5.2.0, so it looks like this is a 6.x-only bug. |
And is it correct that it succeeds with Python 3.9 and multidict 6.0.0? |
It'd be useful to mention in the change note when exactly the regression happened and in which envs. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #929 +/- ##
=======================================
Coverage 96.74% 96.74%
=======================================
Files 19 19
Lines 1965 1968 +3
Branches 188 188
=======================================
+ Hits 1901 1904 +3
Misses 40 40
Partials 24 24 ☔ View full report in Codecov by Sentry. |
6.0.0 does not fail the test with Python 3.9 (and can't be built at all against 3.12, at least on darwin with clang 15.0.0 or 16.0.6). My understanding is that this is a 3.12-specific bug; I suspect, but have not validated, that it was probably present from the point in the 6.x series where 3.12 support was first added. |
@charles-dyfis-net so I made a few final changelog-related suggestions. Assuming you want to squash them into your commit yourself, let me know and I'll merge this! |
e0e07fc
to
f22c3d6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
5fb4dce
to
39048ed
Compare
Implemented as an extension of aio-libs#909, which made this change on Python 3.13 and later. Fixes aio-libs#926 (build failure observed with clang-16.0.6 and gcc-14). Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
39048ed
to
5ac7591
Compare
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.
Thank you 🙏
P.S. Codecov says this PR also increases coverage for 0.01% 😃
What do these changes do?
Fix build issues (observed personally with clang 16.0.6 as wrapped by nixpkgs when building multidict via poetry2nix, and reported by @psss to also happen on gcc-14) related to changes to the
_PyArg_Parser
structure by moving away from this internal interface to use a slower, fully-supported interface instead.Are there changes in behavior for the user?
This change has a performance penalty.
Related issue number
Trivial modification to the work done in #909.
Fixes #926.
Checklist