Skip to content

[3.11] Check for valid tp_version_tag in specializer (gh-89811) #115045

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 3 commits into from
Feb 6, 2024

Conversation

lazorchakp
Copy link
Contributor

@lazorchakp lazorchakp commented Feb 5, 2024

Backports #113558 to 3.11. Also backports #113953, which fixes a bug in the original PR.

  • 3.11 is noticeably different from 3.12 and main here
  • some specializations exist in 3.11 that don't exist elsewhere (and vice versa)
  • after cherry-picking the appropriate commits from main, I updated the source code with new tp_version_tag checks and added tests for these new cases (LOAD_METHOD and BINARY_SUBSCR).
  • I also removed tests for specializations that don't exist in 3.11
  • Finally, I removed the test that manually overflowed builtin type version tags, because in 3.11 type versions seem to be shared between builtin types and user types. This makes it impractical to overflow the type version counter via repeated calls to PyType_Modified (we would need ~2^32 calls instead of ~2^16).

@lazorchakp lazorchakp changed the title [3.12] Check for valid tp_version_tag in specializer (gh-89811) [3.11] Check for valid tp_version_tag in specializer (gh-89811) Feb 5, 2024
@lazorchakp lazorchakp marked this pull request as ready for review February 6, 2024 00:14
@lazorchakp
Copy link
Contributor Author

@Fidget-Spinner Here's the 3.11 backport for tp_version_tag checks in the specializer. I had to add this check in a few new places, unlike the 3.12 backport

@Fidget-Spinner Fidget-Spinner added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Feb 6, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @Fidget-Spinner for commit 1d36a9c 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Feb 6, 2024
@encukou
Copy link
Member

encukou commented Feb 6, 2024

Buildbot summary as of 11:02 UTC: No issues found

Unrelated/expected failures:

  • AMD64 Windows Server 2022 NoGIL PR — builder not applicable for 3.11
  • ARM64 MacOS M1 Refleaks NoGIL PR — builder not applicable for 3.11
  • aarch64 Fedora Stable Clang Installed PR — worker issue (out of space)
  • aarch64 Fedora Stable LTO + PGO PR — worker issue (out of space)
  • aarch64 Fedora Stable LTO PR — worker issue (out of space)
  • wasm32-wasi PR — builder not applicable for 3.11

(Other builds are still running)

@Fidget-Spinner Fidget-Spinner merged commit a113124 into python:3.11 Feb 6, 2024
@lazorchakp lazorchakp deleted the gh-89811-3.11-backport branch February 6, 2024 15:31
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.

4 participants