d3d12_guid_sites: filter IEEE-754 float4 SIMD constant false positives #525

Manually merged
github merged 1 commit from gh-pr/525/head into gh-pr/525/base 2026-11-26 09:05:58 +00:00
Owner

@⁠kotekompotek on GitHub · 2026-11-24 06:55 UTC · original
kotekompotek:work/d3d12-guid-sites-float4-filter → main · +69 −0 · 2 files · 1 commits · merged 2026-11-24 07:38 UTC

IEEE-754 float4 SIMD constants in .rdata (such as (1.5f, 1.0f, ...) or (0.1f, 1.0f, ...)) frequently have exponent/mantissa bits in bytes 7 and 8 that match RFC-4122 UUID version 3/4 and variant 10xx, polluting d3d12_guid_sites.py output with dozens of false-positive UNKNOWN GUIDs (62 out of 259 unknowns on a retail console .exe).

  • Add _looks_like_float4() to tools/d3d12_guid_sites.py and reject such constants in guid_shaped().
  • Add unit tests in tests/test_d3d12_guid_sites_float4.py verifying that float4 constants are rejected while real D3D12/GDK GUIDs remain accepted (9 passed via pytest).
**@⁠kotekompotek** on GitHub · 2026-11-24 06:55 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/525) `kotekompotek:work/d3d12-guid-sites-float4-filter` → `main` · +69 −0 · 2 files · 1 commits · merged 2026-11-24 07:38 UTC IEEE-754 `float4` SIMD constants in `.rdata` (such as `(1.5f, 1.0f, ...)` or `(0.1f, 1.0f, ...)`) frequently have exponent/mantissa bits in bytes 7 and 8 that match RFC-4122 UUID version 3/4 and variant `10xx`, polluting `d3d12_guid_sites.py` output with dozens of false-positive `UNKNOWN` GUIDs (62 out of 259 unknowns on a retail console `.exe`). - Add `_looks_like_float4()` to `tools/d3d12_guid_sites.py` and reject such constants in `guid_shaped()`. - Add unit tests in `tests/test_d3d12_guid_sites_float4.py` verifying that float4 constants are rejected while real D3D12/GDK GUIDs remain accepted (`9 passed` via `pytest`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:05:55 +00:00
github manually merged commit 76faa39680 into gh-pr/525/base 2026-11-26 09:05:58 +00:00
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 07:38 UTC · original

Merging. Why merged: float4 SIMD constants such as (1.5f, 1.0f, ...) were being reported as GUIDs; the new filter rejects them while every real D3D12/GDK GUID is still accepted.
Why it's good: security-reviewed; tested on Windows 11 on main d42773d: the new test fails on main (1 failed / 1 passed) and passes with this PR (2/2); the existing 10 guid_sites tests still pass.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠QemmHD** on GitHub · 2026-11-24 07:38 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/525#issuecomment-7125208014) Merging. Why merged: float4 SIMD constants such as (1.5f, 1.0f, ...) were being reported as GUIDs; the new filter rejects them while every real D3D12/GDK GUID is still accepted. Why it's good: security-reviewed; tested on Windows 11 on main d42773d: the new test fails on main (1 failed / 1 passed) and passes with this PR (2/2); the existing 10 guid_sites tests still pass. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.