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

Strange if statements with goto #1194

Closed
greenozon opened this issue Jun 30, 2018 · 1 comment
Closed

Strange if statements with goto #1194

greenozon opened this issue Jun 30, 2018 · 1 comment

Comments

@greenozon
Copy link

greenozon commented Jun 30, 2018

ILSpy version 3.2.0.3851-rc

Seen this strange decompiled code:

...
	if (!o.FixLeftSpecified)
	{
		goto IL_0437;
	}
	goto IL_0437;
	IL_0437:
	if (!o.FixRightSpecified)
	{
		goto IL_0448;
	}
	goto IL_0448;
	IL_0459:
...

no obfuscation used, plain code,
method Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write50_BarProfileStandard
from #1193

@AustinWise
Copy link
Contributor

While there might not be any obfuscation, this assembly was not compiled from C#. It was generated by the sgen.exe tool. The code patterns generated by that tool don't match those used by csc.exe, which explains why the decompiled code looks strange.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants