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

Closed
opened 2020-05-14 06:38:00 -05:00 by ivanpovazan · 4 comments
ivanpovazan commented 2020-05-14 06:38:00 -05:00 (Migrated from github.com)

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:

github.com/jbevain/cecil@f74703c36e/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:
github.com/jbevain/cecil@f74703c36e/Mono.Cecil.PE/ImageReader.cs (L484)

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

Thank you

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: https://github.com/jbevain/cecil/blob/f74703c36e9a7626ef435399c45d27a84b246864/Mono.Cecil.PE/ImageReader.cs#L484 Does StringHeap have to be present in portable PDB metadata in all cases? And if so, is this requirement documented anywhere? Thank you
jbevain commented 2020-05-14 08:11:47 -05:00 (Migrated from github.com)

No that's a bug :)

No that's a bug :)
ivanpovazan commented 2020-05-14 09:42:03 -05:00 (Migrated from github.com)

Alright :) thank you for the quick answer.

Shall I do the fix?

Alright :) thank you for the quick answer. Shall I do the fix?
jbevain commented 2020-05-14 09:46:48 -05:00 (Migrated from github.com)

@ivanpovazan that would be great! Thank you!

@ivanpovazan that would be great! Thank you!
ivanpovazan commented 2020-05-14 10:24:56 -05:00 (Migrated from github.com)

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

You're welcome :) It is a pleasure to read/work with the code that is clean like this library
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-jbevain/cecil#665
No description provided.