https://github.com/python/cpython/commit/d827d4d0184f8832075c6b75120892439a1d97ee
commit: d827d4d0184f8832075c6b75120892439a1d97ee
branch: main
author: Chris Eibl <[email protected]>
committer: Fidget-Spinner <[email protected]>
date: 2025-04-06T00:00:54+08:00
summary:
gh-131591: Fix GENERATE_DEBUG_SECTION for clangcl on Windows (GH-132112)
files:
M Include/internal/pycore_debug_offsets.h
M Modules/_asynciomodule.c
M Tools/c-analyzer/cpython/ignored.tsv
diff --git a/Include/internal/pycore_debug_offsets.h
b/Include/internal/pycore_debug_offsets.h
index 124b104e4ba8ae..b280633c9ef679 100644
--- a/Include/internal/pycore_debug_offsets.h
+++ b/Include/internal/pycore_debug_offsets.h
@@ -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)))
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index d938955e8cb0e3..b32db3a277cf4a 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -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),
diff --git a/Tools/c-analyzer/cpython/ignored.tsv
b/Tools/c-analyzer/cpython/ignored.tsv
index 18e543ab33bb16..14dc5007b65861 100644
--- a/Tools/c-analyzer/cpython/ignored.tsv
+++ b/Tools/c-analyzer/cpython/ignored.tsv
@@ -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 -
##################################
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]