Skip to content

Binary symbol-server lookup 404s for /Brepro builds with leading-zero TimeDateStamp #2416

@ivberg

Description

@ivberg
  • SymbolReader.cs:525 does buildTimestamp.ToString("x"); the symbol-server convention (matched by symsrv.dll/symchk) is TimeDateStamp:X8 + SizeOfImage:X.
  • Affects PE binaries whose TimeDateStamp's canonical form has a leading zero (i.e., (uint)TS < 0x10000000).
  • Real-world repro: any binary built with /Brepro whose deterministic-hash TimeDateStamp happens to start with a zero nibble. Concrete example: SystemSettings.dll on Windows 11 with TS=0x0D9F641E, SizeOfImage=0x599000 — server has 0d9f641e599000, TraceEvent emits d9f641e599000 and 404s.
  • Fix: buildTimestamp.ToString("x") → buildTimestamp.ToString("x8"). SizeOfImage is correctly variable-width and shouldn't change.

Does it also affect PDB download? No.

PDB lookup (FindSymbolFilePath) uses a different key: Guid:NAge:X.

  • The GUID is fixed 32 hex chars regardless of value (Guid.ToString("N") always emits 32) — no padding issue there.
  • Age is variable-width by convention: both symsrv and TraceEvent agree on no-padding (e.g., age=1 → …1, age=16 → …10). So they match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions