-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Debugging a segmentation fault #13431
Comments
Thanks, I needed to disable the "sqlmypy" plugin in order to be able to repro. When running with uncompiled mypy (using latest master), I get the following stacktrace:
|
Probably another example of issue caused by |
Is there a particular type declaration in my code that's causing this? Type checking is broken downstream for me because of this one file. I have to test my client apps with the import removed from env (using a pre-commit container), which sucks because there's no type checking against this library's exports. |
You can avoid the crash by doing:
Didn't yet look into minimising it. You can also get mypy to avoid processing a single module by doing something like the following in your mypy config:
|
A simple repro test case is
Actually, looking at this, the bug is that we never push to assumptions stack for callback subtyping, while we should. I am not sure what is the best way to do this without a visible performance impact, maybe we can just push them locally in few places where |
I'm not able to repro a crash with the latest version of mypy (1.5). I suspect it was fixed somewhere along the way. |
Fixed in #14178, but I think worth adding Ivan's test case |
See #13431 Authored by ilevkivskyi
Bug Report
Some code I was working on last week is causing mypy to segfault. I tried retracing my steps to find the change that broke mypy, without luck.
Config:
mypy --tb
andmypy --pdb
are segfaulting without any info.gdb
is not available on arm64. I get a bit more info usingfaulthandler
, but all it indicates is the file:The file in question is located at https://github.com/hasgeek/coaster/blob/369ce391f11850f10fc0ab42a52c196188436a50/coaster/views/classview.py
To Reproduce
git clone https://github.com/hasgeek/coaster.git
cd coaster
git checkout 369ce391f11850f10fc0ab42a52c196188436a50
mypy coaster/views/classview.py
The text was updated successfully, but these errors were encountered: