Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

msf: don't put free page map blocks in a stream's list of blocks#14

Merged
jasonwhite merged 1 commit intojasonwhite:masterfrom
evetsso:large-stream
Jun 22, 2018
Merged

msf: don't put free page map blocks in a stream's list of blocks#14
jasonwhite merged 1 commit intojasonwhite:masterfrom
evetsso:large-stream

Conversation

@evetsso
Copy link
Copy Markdown
Contributor

@evetsso evetsso commented Jun 16, 2018

I have a large pdb that was getting corrupted by ducible. Even pdbdump would complain about the corruption after ducible was done processing it.

Basically my pdb has a stream in it that is long enough that it would be interrupted by a FPM block, and can't be stored contiguously in the pdb file. But ducible was trying anyway:

Stream Table
============
    0:        0 bytes,    0 pages []
    1:      118 bytes,    1 pages [4 (0x4000-0x4fff)]
    2: 22279604 bytes, 5440 pages [5-5444 (0x5000-0x1544fff)]
...

AIUI, it shouldn't be possible for such a large contiguous stream to exist in a pdb file, and the original file seemed to show this:

Stream Table
============
    0:       40 bytes,    1 pages [8 (0x8000-0x8fff)]
    1:      118 bytes,    1 pages [16714 (0x414a000-0x414afff)]
    2: 22279604 bytes, 5440 pages [18819 (0x4983000-0x4983fff), 10985-12288 (0x2ae9000-0x3000fff), 12291-16384 (0x3003000-0x4000fff), 16387-16427 (0x4003000-0x402bfff)]
...

It looked like the free page map blocks were getting included in the stream's block list, which messed everything up. It seems that the FPM blocks are implicit and don't need to be written into any stream's block list.

This change fixes things for me, but I don't claim to fully understand everything about the code or the file format.

This tool is awesome! Thanks for developing it!

@jasonwhite
Copy link
Copy Markdown
Owner

Great find! I guess I hadn't tested this on any PDBs that had large enough streams. I found myself a 2 GB PDB and verified your fix.

Thanks for the PR and the detailed explanation!

I'll merge this and make a new release.

@jasonwhite jasonwhite merged commit cb873e8 into jasonwhite:master Jun 22, 2018
@jasonwhite
Copy link
Copy Markdown
Owner

New release published: https://github.com/jasonwhite/ducible/releases/tag/v1.2.1

Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants