Skip to content

Conversation

DinoV
Copy link
Contributor

@DinoV DinoV commented Oct 2, 2025

The specializer isn't checking to see if vectorcall is overridden, but the interpreter loop does. This causes a call which goes through this to randomly go through the interpreter on the first specialization, and then it de-opts and goes through vectorcall.

@DinoV DinoV force-pushed the dont_specialize_vectorcall branch 2 times, most recently from da9f886 to 4e30d66 Compare October 2, 2025 21:22
@DinoV DinoV changed the title Don't specialize functions which have a modified vectorcall gh-139525: Don't specialize functions which have a modified vectorcall Oct 2, 2025
@DinoV DinoV added the skip news label Oct 2, 2025
Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

LGTM. Should we test for this?

@DinoV DinoV marked this pull request as ready for review October 2, 2025 22:22
@DinoV DinoV force-pushed the dont_specialize_vectorcall branch from 797814b to 9a4d5b0 Compare October 3, 2025 16:14
Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks

@DinoV DinoV merged commit ff0cf0a into python:main Oct 3, 2025
47 checks passed
danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
…torcall (python#139524)

Don't specialize functions which have a modified vectorcall
@DinoV DinoV added the needs backport to 3.14 bugs and security fixes label Oct 7, 2025
@miss-islington-app
Copy link

Thanks @DinoV for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @DinoV, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker ff0cf0af10a775ea03dc2546b6a5506a708c2ab7 3.14

DinoV added a commit to DinoV/cpython that referenced this pull request Oct 7, 2025
…torcall (python#139524)

Don't specialize functions which have a modified vectorcall
@bedevere-app
Copy link

bedevere-app bot commented Oct 7, 2025

GH-139709 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants