[New-bugs-announce] [issue44232] Crash in Objects/typeobject.c

Mariusz Felisiak report at bugs.python.org
Tue May 25 07:39:15 EDT 2021

New submission from Mariusz Felisiak <felisiak.mariusz at gmail.com>:

We noticed a behavior change in [1]. One of our tests `apps.tests.AppsTests.test_model_clash()`[2] crashes with:

python: Objects/typeobject.c:3219: type_new: Assertion `type != NULL' failed.
Fatal Python error: Aborted

Current thread 0x00007ffa6951a280 (most recent call first):
  File "django/tests/apps/tests.py", line 301 in test_model_clash
  File "cpython/Lib/unittest/case.py", line 549 in _callTestMethod
  File "cpython/Lib/unittest/case.py", line 592 in run
  File "cpython/Lib/unittest/case.py", line 652 in __call__
  File "django/django/test/testcases.py", line 283 in _setup_and_call
  File "django/django/test/testcases.py", line 247 in __call__
  File "cpython/Lib/unittest/suite.py", line 122 in run
  File "cpython/Lib/unittest/suite.py", line 84 in __call__
  File "cpython/Lib/unittest/runner.py", line 176 in run
  File "django/django/test/runner.py", line 705 in run_suite
  File "django/django/test/runner.py", line 772 in run_tests
  File "django/tests/./runtests.py", line 332 in django_tests
  File "django/tests/./runtests.py", line 596 in <module>
Aborted (core dumped)

This can be an issue is our test which is quite tricky. I will try to investigate it.

[1] https://github.com/python/cpython/commit/ecf14e6557c6e4f7af9c0d6460d31fe121c22553
[2] https://github.com/django/django/blob/7e51893911237dfca9294e3ca12163ff813fb656/tests/apps/tests.py#L274-L309

components: Interpreter Core
messages: 394330
nosy: felixxm, vstinner
priority: normal
severity: normal
status: open
title: Crash in Objects/typeobject.c
type: crash
versions: Python 3.10, Python 3.11

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list