Skip to content

Rust Python gets crashing when rebinding __repr__ as __str__ #2778

@xiaxinmeng

Description

@xiaxinmeng

Rust Python interpreter crashes when rebinding repr as str.

class Foo(object):
    pass

Foo.__repr__ = Foo.__str__

foo = Foo()
str(foo)

Actual output:

Segmentation fault (core dumped)

System:

Ubuntu 16.04
Rust Python 0.1.2 interpreter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions