gh-92888: Fix memoryview bad `__index__` use after free by Fidget-Spinner · Pull Request #92946 · python/cpython · GitHub

github.com

Tin mới

Fidget-Spinner:fix_memoryview_auf

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Fix memoryview bad __index__ use after free

awaiting core review

📜🤖 Added by blurb_it.

needs backport to 3.10
needs backport to 3.10

needs backport to 3.10

needs backport to 3.11
needs backport to 3.11

needs backport to 3.11

needs backport to 3.9
needs backport to 3.9

needs backport to 3.9

needs backport to 3.8
needs backport to 3.8

needs backport to 3.8

needs backport to 3.7
needs backport to 3.7

needs backport to 3.7

Merge branch 'fix_memoryview_auf' of

https://github.com/Fidget-Spinne…

View reviewed changes

Use more comprehensive tests by Serhiy

View reviewed changes

Learn more about hiding disruptive comments

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

Add more tests by Serhiy

View reviewed changes

Fix for tuple index

View reviewed changes

Use After Free when assigning into a memoryview #92888

View reviewed changes

https://github.com/python/cpython/pull/93127/files#diff-d41c6bb40a1e03fea5a20d15c4077413e0ddde65651147922b625b03a66a2f16R399

In my PR, I tried to make the code more generic to test more cases: https://github.com/python/cpython/pull/93127/files#diff-d41c6bb40a1e03fea5a20d15c4077413e0ddde65651147922b625b03a66a2f16R399:

Address Victor's review

View reviewed changes

Lib/test/test_memoryview.py

gh-92888: memory_ass_sub() calls CHECK_RELEASED_INT() twice #93127

: Fix memoryview bad

: Fix memoryview bad

: Fix memoryview bad

: Fix memoryview bad

Revert 30935 defer bpo45162 to 312 (