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

Crossgen /createpdb option doesn't have enough test coverage #13134

Open
MichalStrehovsky opened this issue Jul 23, 2019 · 7 comments
Open

Crossgen /createpdb option doesn't have enough test coverage #13134

MichalStrehovsky opened this issue Jul 23, 2019 · 7 comments

Comments

@MichalStrehovsky
Copy link
Member

I would expect we would at least try to use createpdb with Pri0 tests and make sure it's not bogus.

The option didn't work when default interface methods are present.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 31, 2020
@davidwrighton davidwrighton modified the milestones: 5.0.0, 6.0.0 Aug 10, 2020
@mangod9
Copy link
Member

mangod9 commented Jul 9, 2021

@trylek -- Assume this is still relevant for crossgen2.

@trylek
Copy link
Member

trylek commented Jul 11, 2021

The test coverage is still poor; perhaps we could put something together as part of the 6.0.0 quality week of 8/23 (if I remember the date correctly). An interesting question is what exactly we need to proclaim that the PDB "is not bogus" in the sense of issue description. We'd either need to run some debugger tests or use the PDB manually to translate ETW information or some such; perhaps @hoyosjs might have some ideas or suggestions what could be the sweet spot on the balance between complexity of the testing process and the level of PDB validation.

@mangod9 mangod9 modified the milestones: 6.0.0, 7.0.0 Aug 1, 2021
@trylek trylek self-assigned this Jun 8, 2022
@MichalStrehovsky
Copy link
Member Author

An interesting question is what exactly we need to proclaim that the PDB "is not bogus"

The original bug I ran into when I filed this issue was that we would straight up crash while generating the PDB. Looks like the bug @trylek ran into in #70407 would be detectable by checking whether the PDB was generated at all?

If so, maybe the min bar would be just to: ask crossgen to generate a PDB + check some PDB is on disk after crossgen is done.

@trylek
Copy link
Member

trylek commented Jun 9, 2022

Sadly in this case the PDB actually got generated, it was just bogus due to not being updated upon refcount on the DIA writer going to zero. At the first glance I would be inclined to hand-compile either a test or a framework assembly (SPC being the easiest choice), use DIA to enumerate its symbols and check it for a few hand-picked known methods. I'm certainly open to other suggestions.

@trylek
Copy link
Member

trylek commented Jun 9, 2022

Another option might be to leverage the existing Crossgen determinism test by modifying it to build a PDB on Windows and compare the symbols in the two versions (in addition to checking for some known entries).

@MichalStrehovsky
Copy link
Member Author

Sadly in this case the PDB actually got generated, it was just bogus due to not being updated upon refcount on the DIA writer going to zero

Yeah, that's sad. Looks like DIA is the only option to figure out if the contents is sane.

@agocke
Copy link
Member

agocke commented Jun 9, 2022

We could probably use PdbToXml to validate that the contents of a small assembly are what we expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants