[Mono-list] Division by zero bug

Stefan Matthias Aust sma@3plus4.de
Thu, 27 Feb 2003 14:30:56 +0100

Compiling this tiny program

  public class a {
   public static void Main() {
    System.Console.WriteLine(32 % 0);

crashes mcs - at least on Windows. Replacing % with / also crashes the 
compiler.  Csc correctly generates a somewhat misleading error.  If you 
disguise the error a little bit, using

   int a = 0;
   ...(32 % a);

then both csc and mcs compile the code.  When executed, the .NET 
framework raises a division by zero exception as does mono.  Mint, 
however, crashes.

Stefan Matthias Aust   //
www.3plus4software.de // Inter Deum Et Diabolum Semper Musica Est