Skip to content

Commit 618dc36

Browse files
GH-142050: Jit stencils on Windows contain debug data (#142052)
Co-authored-by: Savannah Ostrowski <[email protected]>
1 parent c0c6514 commit 618dc36

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a bug where JIT stencils produced on Windows contained debug data. Patch by Chris Eibl.

Tools/jit/_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class COFFSection(typing.TypedDict):
8989
Characteristics: dict[
9090
typing.Literal["Flags"], list[dict[typing.Literal["Name"], str]]
9191
]
92+
Name: dict[typing.Literal["Value"], str]
9293
Number: int
9394
RawDataSize: int
9495
Relocations: list[dict[typing.Literal["Relocation"], COFFRelocation]]

Tools/jit/_targets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ class _COFF(
267267
def _handle_section(
268268
self, section: _schema.COFFSection, group: _stencils.StencilGroup
269269
) -> None:
270+
name = section["Name"]["Value"]
271+
if name == ".debug$S":
272+
# skip debug sections
273+
return
270274
flags = {flag["Name"] for flag in section["Characteristics"]["Flags"]}
271275
if "SectionData" in section:
272276
section_data_bytes = section["SectionData"]["Bytes"]

0 commit comments

Comments
 (0)