[Mono-bugs] [Bug 31853][Nor] Changed - mono segfault/memory corruption on explicit enum conversion to string

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
7 Oct 2002 04:31:29 -0000


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 gonzalo@ximian.com.

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

--- shadow/31853	Sun Oct  6 23:50:14 2002
+++ shadow/31853.tmp.27583	Mon Oct  7 00:31:29 2002
@@ -1,22 +1,21 @@
 Bug#: 31853
-Product: Mono/Runtime
+Product: Mono/MCS
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
-Component: misc
+Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: vladimir@pobox.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: mono segfault/memory corruption on explicit enum conversion to string
 
 Given:
 /** startcode **/
 using System;
 class Driver {
@@ -30,6 +29,15 @@
         Console.WriteLine ("fe: " + (string) fe);
     }
 }
 /** endcode **/
 
 mono will segfault.  if the (string) cast is removed, things work as expected.
+
+------- Additional Comments From gonzalo@ximian.com  2002-10-07 00:31 -------
+The code is not legal. Removing the cast fixes it. This is what csc says:
+
+~ $ csc /nologo bug31853.cs
+bug31853.cs(10,38): error CS0030: Cannot convert type 'Driver.FooEnum'
+to 'string'
+
+mcs compiles it and should not.