ILASM/ILDASM bug(?)

  • Thread starter Thread starter gpsmobiler
  • Start date Start date
G

gpsmobiler

Hi,

I found through a lot of exhausting searching, that the following C#
code will cause the IL code below:

const byte ICON_MONO12BY12 =0;

....... IL-file....
.field literal private static unsigned int8 'a' = uint8 (0)

When ILASM tries to compile the IL code, I get this error:
error : syntax error at token 'uint8' in: .field literal public
static unsigned int8 'a' = uint8 (0)

If I change my C# code to use 'const sbyte ...' then it works.

Does anyone know if there is a fix for this bug? (somewhere to get
better ILASM/ILDASM executables?)
 
I found through a lot of exhausting searching, that the following C#
code will cause the IL code below:

const byte ICON_MONO12BY12 =0;

...... IL-file....
.field literal private static unsigned int8 'a' = uint8 (0)

I can't reproduce this. Which version of Ildasm and Ilasm are you
using? The output I get is

..field private static literal unsigned int8 ICON_MONO12BY12 =
int8(0x00)

from the Ildasm v1.1 and

..field private static literal uint8 ICON_MONO12BY12 = uint8(0x00)

from the 2.0 version. Note that uint8 is only a keyword in 2.0, in
previous version you used 'unsigned int8'.


Mattias
 
Mattias said:
.field private static literal unsigned int8 ICON_MONO12BY12 =
int8(0x00)

from the Ildasm v1.1 and

.field private static literal uint8 ICON_MONO12BY12 = uint8(0x00)

from the 2.0 version. Note that uint8 is only a keyword in 2.0, in
previous version you used 'unsigned int8'.

I have ildasm v2.x. I'm getting this problem with the annoying
Dotfrustrator Community Edition. It seems it has an ilasm embedded in
it somewhere, because I can't find it in my filesystem. I can't check
it's version, but it is probably 1.1, thus the conflict.

Do you know where I can download ildasm v1.1?
 
I'm not aware of what this option does, but it is being used (by
Dotfrustrator Community Edition, which is the source of all this
stress).
 
I'm not aware of what this option does, but it is being used (by
Dotfrustrator Community Edition, which is the source of all this
stress).

The ildasm command line help (ildasm /? at the command prompt) gives:

/QUOTEALLNAMES Include all names into single quotes.

So, you coded this:

const byte ICON_MONO12BY12 =0;

The obfuscator changed "CON_MONO12BY12"to "a", and then QUOTEALLNAMES added
the single quotes to yield:

.field literal private static unsigned int8 'a' = uint8 (0)

I'm fairly confident that this explains what went wrong. I'm not sure what
to do about it - no experience with obfuscator and limited experience with
ildasm/ilasm. Maybe you can turn the option off. Maybe you can tell ilasm
to expect single quotes. I thinik this is an obfuscator issue, not an IL
issue, so maybe a repost in a different forum might help.
 
Back
Top