Skip to content

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

Open
ivberg wants to merge 1 commit intomicrosoft:mainfrom
ivberg:fix/exe-symbol-lookup-timedatestamp-padding
Open

Binary symbol-server lookup 404s for /Brepro builds with leading-zero#2417
ivberg wants to merge 1 commit intomicrosoft:mainfrom
ivberg:fix/exe-symbol-lookup-timedatestamp-padding

Conversation

@ivberg
Copy link
Copy Markdown
Contributor

@ivberg ivberg commented Apr 28, 2026

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

SymbolReader.FindExecutableFilePath built the symbol-server key with
buildTimestamp.ToString("x"), which drops the leading hex zero when the
value is < 0x10000000. The symbol-server convention (matched by symsrv
and symchk) requires TimeDateStamp zero-padded to 8 hex digits and
SizeOfImage variable-width — so the produced URL is one digit short and
404s even when the binary is indexed.

This affects PE binaries built with /Brepro (deterministic builds),
whose hash-based TimeDateStamp can legitimately have leading hex zeros.
Concrete repro: SystemSettings.dll on recent Windows builds with
TS=0x0D9F641E, SizeOfImage=0x599000 — server has key 0d9f641e599000,
TraceEvent emitted d9f641e599000.

Fix: use "x8" for TimeDateStamp. SizeOfImage stays "x" since the
convention is variable-width there.

PDB lookup (line 245) is unaffected: the GUID component uses "N" which
always emits 32 chars regardless of value, and Age is variable-width on
both client and server by convention.

Fixes #2416

…ng zero

  SymbolReader.FindExecutableFilePath built the symbol-server key with
  buildTimestamp.ToString("x"), which drops the leading hex zero when the
  value is < 0x10000000. The symbol-server convention (matched by symsrv
  and symchk) requires TimeDateStamp zero-padded to 8 hex digits and
  SizeOfImage variable-width — so the produced URL is one digit short and
  404s even when the binary is indexed.

  This affects PE binaries built with /Brepro (deterministic builds),
  whose hash-based TimeDateStamp can legitimately have leading hex zeros.
  Concrete repro: SystemSettings.dll on recent Windows builds with
  TS=0x0D9F641E, SizeOfImage=0x599000 — server has key 0d9f641e599000,
  TraceEvent emitted d9f641e599000.

  Fix: use "x8" for TimeDateStamp. SizeOfImage stays "x" since the
  convention is variable-width there.

  PDB lookup (line 245) is unaffected: the GUID component uses "N" which
  always emits 32 chars regardless of value, and Age is variable-width on
  both client and server by convention.
@ivberg ivberg requested a review from a team as a code owner April 28, 2026 23:25
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.

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

1 participant