Skip to content

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

Description

@smontanaro

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

Activity

  1. added
    buildThe build process and cross-build
    on Nov 6, 2024
  2. Eclips4 commented on Nov 6, 2024

    @Eclips4
    Member

    Thanks Skip for the report.
    Confirmed on current main

  3. JelleZijlstra commented on Nov 6, 2024

    @JelleZijlstra
    Member
  4. self-assigned this
    on Nov 6, 2024
  5. Eclips4 commented on Nov 6, 2024

    @Eclips4
    Member

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

  6. brettcannon commented on Nov 6, 2024

    @brettcannon
    Member

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

  7. added a commit that references this issue on Nov 6, 2024
  8. Eclips4 commented on Nov 6, 2024

    @Eclips4
    Member

    Fixed in #126517.

  9. added a commit that references this issue on Dec 8, 2024
  10. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buildThe build process and cross-buildtopic-free-threadingtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions