[Mono-bugs] [Bug 481559] New: uninitialized local causes failed assertion in mono_local_regalloc

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 3 12:15:57 EST 2009


           Summary: uninitialized local causes failed assertion in
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Other.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bugzilla.novell at rohou.it
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=276792)
 --> (https://bugzilla.novell.com/attachment.cgi?id=276792)
binary that reproduces the problem when run

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:
Gecko/2009011913 Firefox/3.0.6

When generating code from C, I sometimes have uninitialized locals. When such a
value is returned by the function, Mono crashed with the following message:

** ERROR **: file mini-codegen.c: line 1032 (mono_local_regalloc): assertion
led: (reginfo [ins->sreg1].born_in > 0)

Obviously the code is not verifiable, still it should not kill the register
This case originally occured in C code that looked like:

int c;
int main()
  if (c)
    exit(1); // C compiler optimized out initialization of return value
  return 0;

Reproducible: Always

Steps to Reproduce:
1. Try the following piece of code, or directly the attached binary.
module '<Module>'

method public static int32 'main' () cil managed
        .locals (int32 'tmp')  // not initialized
        .maxstack 1

        ldloc   'tmp'

Actual Results:  
Assertion failed.

Expected Results:  
No assertion.

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

More information about the mono-bugs mailing list