]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131591: Fix GENERATE_DEBUG_SECTION for clangcl on Windows (GH-132112)
authorChris Eibl <138194463+chris-eibl@users.noreply.github.com>
Sat, 5 Apr 2025 16:00:54 +0000 (18:00 +0200)
committerGitHub <noreply@github.com>
Sat, 5 Apr 2025 16:00:54 +0000 (00:00 +0800)
Include/internal/pycore_debug_offsets.h
Modules/_asynciomodule.c
Tools/c-analyzer/cpython/ignored.tsv

index 124b104e4ba8ae1a88ee840afcf061abc6c45a28..b280633c9ef679c5f3c24016ff4f04412782e1ac 100644 (file)
@@ -23,7 +23,9 @@ extern "C" {
    declaration                                      \
    _GENERATE_DEBUG_SECTION_LINUX(name)
 
-#if defined(MS_WINDOWS) && !defined(__clang__)
+// Please note that section names are truncated to eight bytes
+// on Windows!
+#if defined(MS_WINDOWS)
 #define _GENERATE_DEBUG_SECTION_WINDOWS(name)                       \
    _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \
    __declspec(allocate(Py_STRINGIFY(name)))
index d938955e8cb0e34af8a61b624ffb28d9e548b54b..b32db3a277cf4ac1745161a4f44863123147f54c 100644 (file)
@@ -116,7 +116,7 @@ typedef struct _Py_AsyncioModuleDebugOffsets {
     } asyncio_thread_state;
 } Py_AsyncioModuleDebugOffsets;
 
-GENERATE_DEBUG_SECTION(AsyncioDebug, Py_AsyncioModuleDebugOffsets AsyncioDebug)
+GENERATE_DEBUG_SECTION(AsyncioDebug, Py_AsyncioModuleDebugOffsets _AsyncioDebug)
     = {.asyncio_task_object = {
            .size = sizeof(TaskObj),
            .task_name = offsetof(TaskObj, task_name),
index 18e543ab33bb16eb4ed2617292f93967ae9568d4..14dc5007b65861e8ec6b83e37ca2de9c0939d590 100644 (file)
@@ -56,7 +56,7 @@ Python/pyhash.c       -       _Py_HashSecret  -
 Python/parking_lot.c   -       buckets -
 
 ## data needed for introspecting asyncio state from debuggers and profilers
-Modules/_asynciomodule.c       -       AsyncioDebug    -
+Modules/_asynciomodule.c       -       _AsyncioDebug   -
 
 
 ##################################