Skip to content

3.15.0a1 doesn't compile with --disable-gil --with-assertions: Objects/typeobject.c:123:13: error: implicit declaration of function ‘types_world_is_stopped’ [-Wimplicit-function-declaration]#140126

@mgorny

Description

@mgorny

Bug report

Bug description:

When configured via:

./configure --disable-gil --with-assertions 

Build fails:

gcc -c -fno-strict-overflow -Wsign-compare -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -DPy_BUILD_CORE -o Objects/typeobject.o Objects/typeobject.c In file included from ./Include/internal/pycore_backoff.h:12, from ./Include/internal/pycore_code.h:11, from ./Include/internal/pycore_call.h:11, from Objects/typeobject.c:5: Objects/typeobject.c: In function ‘types_stop_world’: Objects/typeobject.c:123:13: error: implicit declaration of function ‘types_world_is_stopped’ [-Wimplicit-function-declaration] 123 | assert(!types_world_is_stopped()); | ^~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:3309: Objects/typeobject.o] Error 1 

Reproduced with 3.15.0a1 and f262297.

The function is incorrectly guarded via Py_DEBUG when it's used via assert() which uses !NDEBUG instead.

Introduced in #133177, CC @nascheme.

CPython versions tested on:

3.15, CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions