Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect column sizes when writing portable or embedded PDB files #532

Merged

Conversation

ElektroKill
Copy link
Contributor

@ElektroKill ElektroKill commented Nov 4, 2023

Fixes #530

The fix was implemented by adjusting the row counts passed into the InitializeSizes to fix a bug where the row counts were incorrect. The patch is heavily based on the code from TablesStream:

var debugSizes = sizes;
if (typeSystemTableRows is not null) {
debugSizes = new uint[sizes.Length];
for (int i = 0; i < 64; i++) {
if (DotNetTableSizes.IsSystemTable((Table)i))
debugSizes[i] = typeSystemTableRows[i];
else
debugSizes[i] = sizes[i];
}
}
dnTableSizes.InitializeSizes(HasBigStrings, HasBigGUID, HasBigBlob, sizes, debugSizes, forceAllBig);

@wtfsck wtfsck merged commit 8a012e9 into 0xd4d:master Nov 4, 2023
2 checks passed
@wtfsck
Copy link
Contributor

wtfsck commented Nov 4, 2023

Thanks!

@jespanag
Copy link

jespanag commented Nov 5, 2023

Thank you @ElektroKill !! ❤️

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.

PDB Generated is wrong
3 participants