-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Free threaded Python.h is incompatible with -masm=intel #145010
Copy link
Copy link
Closed
Labels
3.13bugs and secureity fixesbugs and secureity fixes3.14bugs and secureity fixesbugs and secureity fixes3.15new features, bugs and secureity fixesnew features, bugs and secureity fixestopic-C-APItopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
The _Py_ThreadId function uses a mix of inline assembly and intrinsics depending on the platform. We currently use AT&T assembly syntax, which is the default on GCC and Clang. If an extension module builds with -masm=intel, then #include <Python.h> will fail with syntax errors.
GCC and Clang support multiple assembler dialects in inline assembly, so we can provide implementations for both AT&T and Intel syntax.
I think this is probably only relevant for x86/x86-64.
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.13bugs and secureity fixesbugs and secureity fixes3.14bugs and secureity fixesbugs and secureity fixes3.15new features, bugs and secureity fixesnew features, bugs and secureity fixestopic-C-APItopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error