Skip to content
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

Crash in substitution of nested TypeVar after TypeVarTuple #93345

Closed
serhiy-storchaka opened this issue May 30, 2022 · 0 comments · Fixed by #93346
Closed

Crash in substitution of nested TypeVar after TypeVarTuple #93345

serhiy-storchaka opened this issue May 30, 2022 · 0 comments · Fixed by #93346
Labels
3.11 only security fixes 3.12 bugs and security fixes topic-typing type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@serhiy-storchaka
Copy link
Member

During work on #93330 I have found an error in the C code which causes crash when substitute a TypeVar in nested generic alias after TypeVarTuple.

For example:

>>> from typing import *
>>> T = TypeVar('T')
>>> Ts = TypeVarTuple('Ts')
>>> tuple[*Ts, list[T]][int, str, bool]
Segmentation fault (core dumped)
@serhiy-storchaka serhiy-storchaka added 3.11 only security fixes type-crash A hard crash of the interpreter, possibly with a core dump topic-typing 3.12 bugs and security fixes labels May 30, 2022
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 30, 2022
serhiy-storchaka added a commit that referenced this issue May 31, 2022
…Tuple (GH-93346)

For example: tuple[*Ts, list[T]][int, str, bool]
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 1, 2022
…ypeVarTuple (pythonGH-93346)

For example: tuple[*Ts, list[T]][int, str, bool]
(cherry picked from commit f545fc9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this issue Jun 1, 2022
…Tuple (GH-93346)

For example: tuple[*Ts, list[T]][int, str, bool]
(cherry picked from commit f545fc9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes topic-typing type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant