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

Invalid cyclical TypeSpec in referenced assembly causes stack overflow #7971

Open
nguerrera opened this issue Jan 14, 2016 · 8 comments
Open
Labels
Area-Compilers Bug Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner.
Milestone

Comments

@nguerrera
Copy link
Contributor

Although the EMCA-335 CLI specification does not permit TypeSpec tokens as modifiers, they are allowed in practice by ilasm, peverify, the CLR, and Roslyn. However, they open up the possibility of circular signatures, and the compiler hits a stack overflow while trying to decode one.

I have started to document such spec issues in dotnet/corefx#5435 and I'm now filing the bugs I found while experimenting to write that up.

Native csc.exe had the same problem.

Repro steps

Expected result

  • Compilation fails with suitable error message.

Actual result

  • Stack overflow

cc @tmat @gafter @AlekseyTs

@gafter gafter added the Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner. label Jan 15, 2016
@gafter
Copy link
Member

gafter commented Jan 15, 2016

/cc @jaredpar

@tmat
Copy link
Member

tmat commented Jan 19, 2016

Adding a test to Roslyn.

@jaredpar
Copy link
Member

Closing as #8027 addressed this.

@nguerrera
Copy link
Contributor Author

@jaredpar As far as I can tell, a skipped test was added, but the issue was not resolved. Another related bug was fixed, but I think this one is still unresolved.

@jaredpar
Copy link
Member

@tmat can you comment here? The PR claims to address the bug, does change some product code but does add two tests: one skipped and one active. I only saw the non-skipped parts when I was looking at this bug yesterday.

@gafter
Copy link
Member

gafter commented Feb 19, 2017

Reopening; the PR quoted as fixing this actually just added a (skipped) test for it. I'm not saying I know for sure the problem still exists, but I don't have any evidence that it has been fixed, so I'm reopening this for investigation and possible fixing.

@gafter gafter reopened this Feb 19, 2017
@gafter gafter removed this from the 2.0 (Preview 5) milestone Feb 19, 2017
@tmat
Copy link
Member

tmat commented Feb 19, 2017

I am not aware of any fix we made to address this.

@gafter gafter added this to the Unknown milestone Sep 15, 2017
@gafter
Copy link
Member

gafter commented Sep 15, 2017

The compilers have not been hardened against broken metadata. This should be fixed in the context of a (hypothetical) effort to harden the compilers against different kinds of broken metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Tenet-Reliability Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner.
Projects
None yet
Development

No branches or pull requests

6 participants