-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Comments
This was referenced Jul 16, 2020
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.
@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.
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
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).
The text was updated successfully, but these errors were encountered: