Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Crash with an evil custommro() on a metaclass #92112

Closed
Labels
type-crashA hard crash of the interpreter, possibly with a core dump
@izbyshev

Description

@izbyshev

Crash report

There is a path intype_mro_modified that results in double-free of*mro_meth:

A reproducer:

class B:    passclass M(type):    def mro(cls):        del M.mro        return (B,)class C(metaclass=M):    pass

Crash with the debug CPython:

$ ./python mro-crasher.py/home/test/cpython/Include/object.h:601: _Py_NegativeRefcount: Assertion failed: object has negative ref count<object at 0x7f88c12d1a90 is freed>Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailedPython runtime state: initializedCurrent thread 0x00007f88c13cb080 (most recent call first):  File "/home/test/mro-crasher.py", line 9 in <module>Aborted (core dumped)

This bug was introduced in#73052.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp