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

[Q] Is it true that StringHeap must always be present in a portable PDB metadata? #665

Closed
ivanpovazan opened this issue May 14, 2020 · 4 comments · Fixed by #666
Closed

Comments

@ivanpovazan
Copy link
Contributor

In the following section of the code, StringHeap is treated as it will always be present in the metadata, while for Guid and Blob heaps that is not the case:

https://github.com/jbevain/cecil/blob/f74703c36e9a7626ef435399c45d27a84b246864/Mono.Cecil.PE/ImageReader.cs#L480#L486

I am working on a tool for creating portable PDB metadata (and verifying it with Cecil library), and in some cases when StringHeap is not present in the portable PDB metadata, Cecil library throws null exception at:

int stridx_size = image.StringHeap.IndexSize;

Does StringHeap have to be present in portable PDB metadata in all cases?
And if so, is this requirement documented anywhere?

Thank you

@jbevain
Copy link
Owner

jbevain commented May 14, 2020

No that's a bug :)

@ivanpovazan
Copy link
Contributor Author

Alright :) thank you for the quick answer.

Shall I do the fix?

@jbevain
Copy link
Owner

jbevain commented May 14, 2020

@ivanpovazan that would be great! Thank you!

@ivanpovazan
Copy link
Contributor Author

You're welcome :)
It is a pleasure to read/work with the code that is clean like this library

jbevain pushed a commit that referenced this issue May 14, 2020
…data when computing table information (#665) (#666)

Co-authored-by: ivan <ivan@raincode.com>
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 a pull request may close this issue.

2 participants