fix: use SSQP FFFFFFFF age for portable PDBs - #18
Open
bobbyg603 wants to merge 3 commits into
Open
Conversation
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.
There was a problem hiding this comment.
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 of1) when generating portable PDB keys. - Align the metadata version string length to a 4-byte boundary before reading stream headers.
- Reject
#Pdbstreams 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.
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).
2 tasks
Use arithmetic Math.ceil alignment instead of bitwise & ~3 so a malformed uint32 versionLength above 0x7fffffff cannot produce a negative streamsHeaderOffset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Portable PDBs were already supported by
pdb-guid, but the age was wrong:1→ key…B431(or…B81on symbol-upload fixtures)0xFFFFFFFF→ key…B43FFFFFFFFper SSQP Portable-Pdb-SignatureAlso:
#Pdbstreams smaller than the 20-byte PDB idVersion bumped to 2.1.2.
Test plan
npm test— 29 passednpm run buildnpm publishfrom main (or this tag) so symbol-upload can consumepdb-guid@^2.1.2