Skip to content

Passing a keyword argument to a subclass of the built-in class "set" causes a crash. #10961

@xiaxinmeng

Description

@xiaxinmeng

Passing a keyword argument to a subclass of the built-in class "set" causes a crash. See the following example.

test.py

class Test(set):
    def __init__(self, a=0):
        self.add(a)

t = Test(a=0)

Error message:

Segmentation Fault(core dumped)

The expected output: work well (behavior on CPython 3.10.8)

how to replicate it:

  1. install micropython (unix port)
  2. run it under unix port

->> 'micropython/ports/unix/build-standard/micropython' test.py

Environment:
compiler versions: MicroPython v1.19.1-724-gfb7d21153 on 2023-03-07; linux [GCC 7.5.0] version
operating system: Ubuntu 18.04.6 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions