Skip to content

Commit d827d4d

Browse files
authored
gh-131591: Fix GENERATE_DEBUG_SECTION for clangcl on Windows (GH-132112)
1 parent 29772b0 commit d827d4d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Include/internal/pycore_debug_offsets.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ extern "C" {
2323
declaration \
2424
_GENERATE_DEBUG_SECTION_LINUX(name)
2525

26-
#if defined(MS_WINDOWS) && !defined(__clang__)
26+
// Please note that section names are truncated to eight bytes
27+
// on Windows!
28+
#if defined(MS_WINDOWS)
2729
#define _GENERATE_DEBUG_SECTION_WINDOWS(name) \
2830
_Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \
2931
__declspec(allocate(Py_STRINGIFY(name)))

Modules/_asynciomodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ typedef struct _Py_AsyncioModuleDebugOffsets {
116116
} asyncio_thread_state;
117117
} Py_AsyncioModuleDebugOffsets;
118118

119-
GENERATE_DEBUG_SECTION(AsyncioDebug, Py_AsyncioModuleDebugOffsets AsyncioDebug)
119+
GENERATE_DEBUG_SECTION(AsyncioDebug, Py_AsyncioModuleDebugOffsets _AsyncioDebug)
120120
= {.asyncio_task_object = {
121121
.size = sizeof(TaskObj),
122122
.task_name = offsetof(TaskObj, task_name),

Tools/c-analyzer/cpython/ignored.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Python/pyhash.c - _Py_HashSecret -
5656
Python/parking_lot.c - buckets -
5757

5858
## data needed for introspecting asyncio state from debuggers and profilers
59-
Modules/_asynciomodule.c - AsyncioDebug -
59+
Modules/_asynciomodule.c - _AsyncioDebug -
6060

6161

6262
##################################

0 commit comments

Comments
 (0)