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

MdbWriter doesn't write the correct MVID when using deterministic MVID #680

Closed
vitek-karas opened this issue Jul 16, 2020 · 2 comments · Fixed by #681
Closed

MdbWriter doesn't write the correct MVID when using deterministic MVID #680

vitek-karas opened this issue Jul 16, 2020 · 2 comments · Fixed by #681

Comments

@vitek-karas
Copy link
Contributor

MdbWriter caches the MVID to write upon construction of the writer from the module's Mvid property. But in case of deterministic MVID the actual MVID is computed after the MdbWriter is constructed. So the symbols end up using the wrong (Typically all zeroes) MVID.

I looked at how PortablePdb does this, and the writer in this case holds on to the ModuleDefinition and reads its Mvid property only when actually writing the symbols (which is after it was populated with the right value).

vitek-karas added a commit to vitek-karas/cecil that referenced this issue Jul 16, 2020
…t is required

This is a fix for jbevain#680.

The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
marek-safar pushed a commit to dotnet/cecil that referenced this issue Jul 16, 2020
…t is required

This is a fix for jbevain#680.

The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
@jbevain
Copy link
Owner

jbevain commented Jul 16, 2020

@vitek-karas good catch, could up send your PR upstream? Thanks!

vitek-karas added a commit to vitek-karas/cecil that referenced this issue Jul 20, 2020
…t is required

This is a fix for jbevain#680.

The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
@vitek-karas
Copy link
Contributor Author

@jbevain ported to upstream in #681

jbevain pushed a commit that referenced this issue Jul 21, 2020
…t is required (#681)

This is a fix for #680.

The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
mrvoorhe pushed a commit to Unity-Technologies/cecil that referenced this issue Oct 14, 2020
…t is required (jbevain#681)

This is a fix for jbevain#680.

The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
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