8000 segmentation fault on indexing object with __getattr__ · Issue #6579 · python/mypy · GitHub
[go: up one dir, main page]

Skip to con 8000 tent

segmentation fault on indexing object with __getattr__ #6579

@programmerjake

Description

@programmerjake

Please provide more information to help us understand the issue:

  • Are you reporting a bug, or opening a feature request?
    Bug.
  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the sourc 6398 e is private. We would appreciate
    if you try to simplify your case to a minimal repro.
class C:
    def __getattr__(self, name: str) -> 'C':
        ...


def f(v: C) -> None:
    v[0]
  • What is the actual behavior/output?
    segfault

  • What is the behavior/output you expect?
    not crashing

  • What are the versions of mypy and Python you are using?
    python 3.6.7 on Ubuntu 18.04.2 x86_64
    mypy 0.670 installed march 20 2019 via pip

    Do you see the same issue after installing mypy from Git master?
    yes
    0.680+dev.4e0a1583aeb00b248e187054980771f1897a1d31

  • What are the mypy flags you are using? (For example --strict-optional)
    none

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0