Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SET_OPCODE_OR_RETURN undefined if configured with --disable-gil #126513

Closed
smontanaro opened this issue Nov 6, 2024 · 5 comments
Closed

SET_OPCODE_OR_RETURN undefined if configured with --disable-gil #126513

smontanaro opened this issue Nov 6, 2024 · 5 comments
Assignees
Labels
build The build process and cross-build topic-free-threading type-bug An unexpected behavior, bug, or error

Comments

@smontanaro
Copy link
Contributor

smontanaro commented Nov 6, 2024

Bug report

Bug description:

The latest commit seems to have broken specialized.c when the GIL is disabled.

gcc -c -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall    -D_Py_TIER2=1 -D_Py_JIT -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 Python/specialize.o Python/specialize.c
Python/specialize.c:2801:5: error: call to undeclared function 'SET_OPCODE_OR_RETURN'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 2801 |     SET_OPCODE_OR_RETURN(instr, CONTAINS_OP);
      |     ^
1 error generated.

Execute the basic ./configure and compilation succeeds. Add --disable-gil to the configure command line and the above error is generated.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux, macOS

Linked PRs

@smontanaro smontanaro added the type-bug An unexpected behavior, bug, or error label Nov 6, 2024
@Eclips4 Eclips4 added the build The build process and cross-build label Nov 6, 2024
@Eclips4
Copy link
Member

Eclips4 commented Nov 6, 2024

Thanks Skip for the report.
Confirmed on current main

@JelleZijlstra
Copy link
Member

cc @mpage

@Eclips4 Eclips4 self-assigned this Nov 6, 2024
@Eclips4
Copy link
Member

Eclips4 commented Nov 6, 2024

I can take care of this. It's easy to fix. :)

@brettcannon
Copy link
Member

In case anyone wants to see the failure in a buildbot, https://buildbot.python.org/all/#/builders/1046/builds/6656 .

mpage pushed a commit that referenced this issue Nov 6, 2024
* Use helpers for _Py_Specialize_ConstainsOp

* Remove unnecessary variable
@Eclips4
Copy link
Member

Eclips4 commented Nov 6, 2024

Fixed in #126517.

@Eclips4 Eclips4 closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build topic-free-threading type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants