Skip to content

test: add msvc function-boundary fixtures for #384 - #385

Merged
danielplohmann merged 1 commit into
masterfrom
tests/msvc-smda384-corpus
Oct 14, 2026
Merged

danielplohmann merged 1 commit into
masterfrom
tests/msvc-smda384-corpus

Conversation

@danielplohmann

Copy link
Copy Markdown
Owner

Adds tests/msvc_smda384_corpus/: minimal MSVC-built DLLs that reproduce the function-boundary problems in #384, as data for whoever picks up the fix. No code changes and no tests yet. The fixtures are added only, and a regression test belongs with the fix.

What is in it (1.4 MB)

  • Three DLLs (x86, x64, arm64) at /O2, 11-14 KB each, with their PDBs. They are xored with byte ^ (index % 256) like the existing fixtures.
  • manifest.json per fixture:
    • raw and xored sha256 of DLL and PDB, base address, toolchain and exact flags;
    • expected_functions: the 11 functions of cases.obj from the linker map, with address, name and static / public;
    • known_failures_smda_4_9_0: current results with and without the PDB.
  • src/: the C sources. They were written for this purpose; no third-party or malware code.
  • README.md: the three behaviours, which cases trigger them, and the build.

Current SMDA 4.9.0 results against the map

build no PDB with PDB cause
x86 /O2 9/11 9/11 a block after ret split off (case_b2_whitespace); a jump table in .text decoded as code swallows case_b4_aggregate
x64 /O2 10/11 10/11 a block after ret split off (case_b2_whitespace)
arm64 /O2 9/11 11/11 shrink-wrapped prologue taken as a function start (case_a2_unistr, case_a3_concat)

Build

  • VS 2026 Build Tools (cl 19.51.36260, link 14.51.36260), on a GitHub windows-2025 runner in a neutral directory.
  • /O2 /MD /Zi /Brepro and /DLL /DEBUG:FULL /OPT:REF /OPT:NOICF /PDBALTPATH:%_PDB% /MAP.
  • The output contains no machine- or user-specific paths, apart from Microsoft's own CRT object paths in the PDBs.

Refs #384.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HDZJnaEz52GwyRZzXP8Mya

Minimal MSVC /O2 DLLs (x86, x64, arm64) with PDBs, xored, plus a manifest
with the linker-map truth and SMDA 4.9.0's current failures, and the C sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HDZJnaEz52GwyRZzXP8Mya
@r0ny123

r0ny123 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Thanks, these reproduce exactly the table in the description on master.

One correction for the README: case_b2_whitespace's extra start (+0xd5 on x86, +0x10d on x64) is not a block after ret. The switch is two-level: movzx ecx, byte ptr [ecx + idx]; jmp dword ptr [ecx*4 + table], and SMDA only books the dword table as data. The 218-byte index table behind it (04 04 ... = add al, 4) is then picked up by the gap scan as a function.

With the fix for #384 on top, all six builds are 11/11 with and without the PDB. I'll add a regression test over these fixtures there once this is merged.

@danielplohmann danielplohmann added this to the v4.10.0 milestone Oct 14, 2026
@danielplohmann
danielplohmann merged commit 9ea9e10 into master Oct 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants