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

Segmentation fault on my overloaded decorator #16278

Closed
t184256 opened this issue Oct 17, 2023 · 2 comments
Closed

Segmentation fault on my overloaded decorator #16278

t184256 opened this issue Oct 17, 2023 · 2 comments
Labels
bug mypy got something wrong crash

Comments

@t184256
Copy link

t184256 commented Oct 17, 2023

Bug Report

With mypy 1.6.0, I get a segmentation fault when typechecking a decorator, overloaded to work with and without parameters. I'm not getting any INTERNAL ERROR or tracebacks, thus not filing this as "Crash Report". This was not the case with mypy 1.4.0 and mypy 1.5.1.

To Reproduce

Code example: GitHub link or, alternatively attachment

Crash example: GitHub actions log or, alternatively, mypy.crash.log

Local environment exhibiting the same crash:

$ python3 --version; rpm -q python3
Python 3.11.6
python3-3.11.6-1.fc38.x86_64
$ /usr/bin/virtualenv venv && venv/bin/python -m pip install mypy
created virtual environment CPython3.11.6.final.0-64 in 95ms
...
Successfully installed mypy-1.6.0 mypy-extensions-1.0.0 typing-extensions-4.8.0

Actual Behavior

$ venv/bin/python -m mypy decorator.py
Segmentation fault (core dumped)

Your Environment

  • Mypy version used: 1.6.0
  • Mypy command-line flags: none; --tb
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: 3.11.6 / python3-3.11.6-1.fc38.x86_64
@t184256 t184256 added the bug mypy got something wrong label Oct 17, 2023
@sobolevn sobolevn added topic-join-v-union Using join vs. using unions and removed topic-join-v-union Using join vs. using unions labels Oct 17, 2023
@AlexWaygood
Copy link
Member

AlexWaygood commented Oct 17, 2023

I can reproduce the crash with mypy 1.6, but it seems it's already fixed on the mypy master branch. It's almost certainly a duplicate of #16245, which was also a new-in-1.6 segfault involving ParamSpec and overloads that caused mypy to exit without any traceback

@t184256
Copy link
Author

t184256 commented Oct 17, 2023

Looks like it! mypy-1.7.0+dev.4a9e6e60884c0bab89eb2ec6e947373c871f8aee has indeed succeeded without a crash. Thank you for a prompt response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong crash
Projects
None yet
Development

No branches or pull requests

4 participants