-
-
Notifications
You must be signed in to change notification settings - Fork 3k
mypy 1.7.0 crashes (segmentation fault) #16450
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
Comments
output of mypy with --verbose: https://gist.github.com/jepler/6087e5ba5e9b0298f7ceecc416a68bc5 |
Thanks for the crash report! Can you check if using |
That flag doesn't change the outcome:
the gdb stack-trace and the |
Minimized test case:
|
And the truly minimized test case: """ A Partial helper that can be used to add arguments for an arbitrary class or callable. """
from typing import Callable
from typing_extensions import TypeVar
_T = TypeVar("_T", bound=Any)
class Partial:
def __call__(self: Callable[..., None]) -> _T:
... This is of course nonsense since _T doesn't appear on the left, but the segmentation fault should probably still not occur. |
The slightly less nonsense |
Interpreted version results in
It is likely caused by one of my PRs (where I enabled |
Thank you! |
@ilevkivskyi Using my truly minimized example and git bisect, I believe the problem may have been introduced at commit f41e24c:
edited to add git bisect log:
|
Fixes #16450 The fix is a bit ad-hoc, but OTOH there is nothing meaningful we can infer in such situation, so it is probably OK.
Fixes #16450 The fix is a bit ad-hoc, but OTOH there is nothing meaningful we can infer in such situation, so it is probably OK.
Bug Report
mypy 1.7.0 exits with a segmentation fault analyzing code that passed under 1.6.1
To Reproduce
I do not have a minimized test case at this point.
Expected Behavior
Actual Behavior
Segmentation fault. The cause seems to be unbounded recursion, as shown in this partial gdb backtrace:
Your Environment
mypy -p chap
The text was updated successfully, but these errors were encountered: