[Mono-dev] Weird bug in new port

Bill Seurer seurer at us.ibm.com
Fri Jul 14 19:53:40 EDT 2006


We're seeing a weird bug in the port (of Mono 1.1.15) we are working on for
PASE on i5/OS (i.e., AIX).

Here's a good example.  If I run this C# program (a small extract from
something else):

class MainClass
{
      public static void Main(string[] args)
      {
            int i;
            object o;
            string s1;

            i = 12345678;           // 0x00bc614e
            o = (object)i;
            s1 = o.ToString();
            System.Console.WriteLine(s1);
      }
}

I get something like this output:

537061256

which is 0x2002E788 in hex and probably a pointer to something that Mono
created internally (it's in the right range for memory that Mono is
allocating from).

Everything looks good up to the call to ToString and ToString returns a
string that actually has the characters "537061256" in it.  So it looks
like ToString or something it calls is the culprit.  Does this look like
anything someone else may have run into?

I'm going to try to trace at a machine instruction level through ToString
as it executes but that gets tricky with multiple function calls through
pointers that Mono makes.
--
Bill Seurer     IBM System i5 internal compiler development   Rochester, MN
Business: seurer at us.ibm.com                         Home: Bill at seurer.net
http://w3.rchland.ibm.com/~seurer/                  http://www.seurer.net




More information about the Mono-devel-list mailing list