[Mono-bugs] [Bug 483234] New: gmcs allows bad code when using automatic properties with structs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Mar 8 08:35:58 EDT 2009


           Summary: gmcs allows bad code when using automatic properties
                    with structs
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.2.x
          Platform: PowerPC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jesjones at mindspring.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Struct constructors are supposed to initialize all fields in the struct. If
this is not done error CS0171 is emitted. Csc does the same sort of thing for
the fields generated by automatic properties except that errors CS0188 and
CS0843 are emitted. But gmcs does not emit these errors.

This is a serious problem because the compiler allows code to be generated
which doesn't initialize all of the fields in the struct which means that, in
some cases at least, the fields have whatever value happened to be at their
memory address.

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