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

Rountrip PDBs with missing constant signature #145

Open
tmat opened this issue Jun 11, 2018 · 0 comments
Open

Rountrip PDBs with missing constant signature #145

tmat opened this issue Jun 11, 2018 · 0 comments

Comments

@tmat
Copy link
Member

tmat commented Jun 11, 2018

Repro

Program.cs:

using System;

class Program
{
    static void Main(string[] args)
    {
       const float f = 1.0f;
       double x = f;
       Console.WriteLine(x);
    }
}
  1. csc Program.cs /debug:portable
  2. pdb2pdb a.exe
  3. pdb2pdb a.exe /pdb a.pdb2 /out a.pdb3
PDB0017: token 0x06000001: Invalid local constant data

The second step produces a PDB with NIL constant token signature since there is no StandAloneSig in a.exe that matches float signature.

The third step then calls ISymUnmanagedConstant.GetSignature on such constant and reports an error.
We could infer the constant signature from the value for primitive types.

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

No branches or pull requests

1 participant