Skip to content

fix: use SSQP FFFFFFFF age for portable PDBs - #18

Open
bobbyg603 wants to merge 3 commits into
mainfrom
fix/portable-pdb-ssqp-age
Open

fix: use SSQP FFFFFFFF age for portable PDBs#18
bobbyg603 wants to merge 3 commits into
mainfrom
fix/portable-pdb-ssqp-age

Conversation

@bobbyg603

@bobbyg603 bobbyg603 commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Portable PDBs were already supported by pdb-guid, but the age was wrong:

  • Before: age 1 → key …B431 (or …B81 on symbol-upload fixtures)
  • After: age 0xFFFFFFFF → key …B43FFFFFFFF per SSQP Portable-Pdb-Signature

Also:

  • Align the ECMA-335 version string to a 4-byte boundary before reading stream headers
  • Reject #Pdb streams smaller than the 20-byte PDB id

Version bumped to 2.1.2.

Test plan

  • npm test — 29 passed
  • npm run build
  • Merge, then npm publish from main (or this tag) so symbol-upload can consume pdb-guid@^2.1.2

Portable PDB symbol-store keys must use age 0xFFFFFFFF (UInt32.MaxValue)
per the SSQP Portable-Pdb-Signature convention, not age 1. Also align the
ECMA-335 version string to a 4-byte boundary before reading stream headers,
and reject #Pdb streams smaller than the 20-byte PDB id.
Copilot AI review requested due to automatic review settings July 20, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the portable PDB parser to match SSQP portable-PDB key conventions and to more correctly parse ECMA-335 metadata stream headers.

Changes:

  • Use SSQP portable PDB “age” value 0xFFFFFFFF (instead of 1) when generating portable PDB keys.
  • Align the metadata version string length to a 4-byte boundary before reading stream headers.
  • Reject #Pdb streams that are smaller than the 20-byte PDB id.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/portable-pdb.ts Updates portable PDB key age to 0xFFFFFFFF, fixes stream header offset calculation with 4-byte alignment, and validates #Pdb stream size.
spec/portable-pdb.spec.ts Updates expectations to assert SSQP FFFFFFFF age behavior for portable PDBs.
spec/guid.spec.ts Adds coverage to ensure GUID formatting includes FFFFFFFF for the portable PDB age value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/portable-pdb.ts
bobbyg603 added a commit to BugSplat-Git/symbol-upload that referenced this pull request Jul 20, 2026
pdb-guid already parses portable PDBs. The real bug was the age value
(age 1 instead of SSQP FFFFFFFF), which is fixed in pdb-guid 2.1.2.
Remove the duplicated portable-pdb module and depend on that release.

Requires pdb-guid@2.1.2 to be published (BugSplat-Git/pdb-guid#18).
Use arithmetic Math.ceil alignment instead of bitwise & ~3 so a
malformed uint32 versionLength above 0x7fffffff cannot produce a
negative streamsHeaderOffset.
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