From 6c4fab14d66d4a650e716e9c4dd034e427b888b5 Mon Sep 17 00:00:00 2001 From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Fri, 28 Nov 2025 21:38:33 +0100 Subject: [PATCH 1/4] skip debug COFF sections on Windows --- Tools/jit/_targets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index a76d8ff2792602..4c188d74a68602 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -267,6 +267,10 @@ class _COFF( def _handle_section( self, section: _schema.COFFSection, group: _stencils.StencilGroup ) -> None: + name = section["Name"]["Value"] + if name == ".debug$S": + # skip debug sections + return flags = {flag["Name"] for flag in section["Characteristics"]["Flags"]} if "SectionData" in section: section_data_bytes = section["SectionData"]["Bytes"] From 6e5fd82785871b70c0097b442cbc8cfe3582b479 Mon Sep 17 00:00:00 2001 From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Fri, 28 Nov 2025 21:43:24 +0100 Subject: [PATCH 2/4] blurb it --- .../next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst diff --git a/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst b/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst new file mode 100644 index 00000000000000..c04b8710978bf4 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst @@ -0,0 +1,2 @@ +Jit stencils should not contain debug data. Only Windows was affected. Fixed +by Chris Eibl. From 102fb68104d5ef5ea538ec7913c1beeca5e9fd90 Mon Sep 17 00:00:00 2001 From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Fri, 28 Nov 2025 22:01:29 +0100 Subject: [PATCH 3/4] make mypy happy --- Tools/jit/_schema.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/jit/_schema.py b/Tools/jit/_schema.py index c47e9af924a20e..4e86abe604972e 100644 --- a/Tools/jit/_schema.py +++ b/Tools/jit/_schema.py @@ -89,6 +89,7 @@ class COFFSection(typing.TypedDict): Characteristics: dict[ typing.Literal["Flags"], list[dict[typing.Literal["Name"], str]] ] + Name: dict[typing.Literal["Value"], str] Number: int RawDataSize: int Relocations: list[dict[typing.Literal["Relocation"], COFFRelocation]] From 1914f2ec64c2a1bf349207b1a0e9fb69c5546ec6 Mon Sep 17 00:00:00 2001 From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Tue, 2 Dec 2025 08:09:05 +0100 Subject: [PATCH 4/4] Update Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst Co-authored-by: Savannah Ostrowski --- .../next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst b/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst index c04b8710978bf4..8917d5df76e5c0 100644 --- a/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst +++ b/Misc/NEWS.d/next/Build/2025-11-28-21-43-07.gh-issue-142050.PFi4tv.rst @@ -1,2 +1 @@ -Jit stencils should not contain debug data. Only Windows was affected. Fixed -by Chris Eibl. +Fixed a bug where JIT stencils produced on Windows contained debug data. Patch by Chris Eibl.