Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-43636: Validate the version tag in _PyType_Lookup#25032

Merged
pablogsal merged 2 commits into
python:masterpython/cpython:masterfrom
pablogsal:fix_descpablogsal/cpython:fix_descCopy head branch name to clipboard
Mar 27, 2021
Merged

bpo-43636: Validate the version tag in _PyType_Lookup#25032
pablogsal merged 2 commits into
python:masterpython/cpython:masterfrom
pablogsal:fix_descpablogsal/cpython:fix_descCopy head branch name to clipboard

Conversation

@pablogsal

@pablogsal pablogsal commented Mar 27, 2021

Copy link
Copy Markdown
Member

@pablogsal

Copy link
Copy Markdown
Member Author

❯ ./python -m test test_descr -m test_slots -R :
0:00:00 load avg: 0.36 Run tests sequentially
0:00:00 load avg: 0.36 [1/1] test_descr
beginning 9 repetitions
123456789
.........

== Tests result: SUCCESS ==

1 test OK.

Total duration: 477 ms
Tests result: SUCCESS

@DinoV

DinoV commented Mar 27, 2021

Copy link
Copy Markdown
Contributor

If you want to add some asserts at the same time, it'd be good to assert assert(_PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG)); on a cache hit, and assert(type->tp_version_tag != 0); when we're about to store the cache.

@pablogsal

Copy link
Copy Markdown
Member Author

If you want to add some asserts at the same time, it'd be good to assert assert(_PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG)); on a cache hit, and assert(type->tp_version_tag != 0); when we're about to store the cache.

Done in 589c3da

@pablogsal pablogsal merged commit 11b85ab into python:master Mar 27, 2021
@pablogsal pablogsal deleted the fix_desc branch May 19, 2021 18:57
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.