[Mono-bugs] [Bug 70154][Nor] New - Incorrectly encoded constants.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 2 Dec 2004 17:04:20 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by miguel@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=70154

--- shadow/70154	2004-12-02 17:04:20.000000000 -0500
+++ shadow/70154.tmp.17801	2004-12-02 17:04:20.000000000 -0500
@@ -0,0 +1,59 @@
+Bug#: 70154
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: IL assembler
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Incorrectly encoded constants.
+
+The following program incorrectly encodes constants in an enum:
+
+ilasm /dll b.il
+
+
+//  Microsoft (R) .NET Framework IL Disassembler.  Version 1.1.4322.573
+//  Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
+
+.assembly extern mscorlib
+{
+  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         //
+.z\V.4..
+  .ver 1:0:5000:0
+}
+.assembly extern System
+{
+  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         //
+.z\V.4..
+  .ver 1:0:5000:0
+}
+
+    .class auto ansi sealed public State
+           extends [mscorlib]System.Enum
+    {
+      .field public specialname rtspecialname int32 value__
+      .field public static literal valuetype State Uninitialized = int32(1)
+    } // end of class State
+
+Monodis complains with:
+
+  .class public auto ansi sealed State
+  	extends [mscorlib]System.Enum
+  {
+    .field  public specialname  rtspecialname   int32 value__
+
+** ERROR **: Unknown MONO_TYPE (1) on constant at Blob index (0x00000011)
+
+
+Ildasm from Microsoft reports:
+
+ILLEGAL CONSTANT type:0x11 size:4 bytes, blob: (4C 1A 0B 00)