[Mono-bugs] [Bug 328774] New: Crash: string concatenation operator

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 26 22:38:55 EDT 2007


           Summary: Crash: string concatenation operator
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: rharinath at novell.com
        ReportedBy: miguel at novell.com
         QAContact: mono-bugs at ximian.com
          Found By: ---

Miguel de Icaza <miguel at novell.com> changed:

           What    |Removed                                         |Added
               Flag|                                                |SHIP_STOPPER+

The following code produces invalid IL:

class X {
        static void Main ()
                new X ().Do ("a","b","c");

        string str = "start";

        void Do (string a, string b, string c)
                str += a + "," + b + "," + c;

Tested with:
Mono JIT compiler version 1.2.5.xx (/trunk/ r86177)
(ie, post 1.2.5)

It produces:

mmono$ mono /tmp/bug.exe

Unhandled Exception: System.InvalidProgramException: Invalid IL code in X:Do
(string,string,string): IL_000a: ldfld     0x04000001

  at X.Main () [0x00000]

Rewriting the code to be:

str = str + ....

instead of:

str += ...

works around this issue

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list