[Mono-bugs] [Bug 506915] New: Use of tertiary operator results in runtime stack trace but equivalent if/else code does not

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 25 11:50:00 EDT 2009


           Summary: Use of tertiary operator results in runtime stack
                    trace but equivalent if/else code does not
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: x86
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: mtraudt at quantifisolutions.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=294252)
 --> (http://bugzilla.novell.com/attachment.cgi?id=294252)
Reproducible test case

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64;
SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.21022; OfficeLiveConnector.1.3;
OfficeLivePatch.0.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

The attached code sample is compiled by gmcs without error.  However, when I
run using the Mono runtime, I get a stack trace.  If I run the same exe with
the MS CLR, then I do not get an error. 

If I comment out the "#define BAD", then it uses an equivalent if/else block
instead of the tertiary operator, and works fine.

Reproducible: Always

Steps to Reproduce:
1. Compile the attached program using gmcs
2. Run with the Mono 2.4 runtime (I tested using openSUSE 11.0)
Actual Results:  
Program aborts with stack trace

Expected Results:  
Should complete with message "Done"

I am marking as Critical since it causes my program to crash badly.  It does
appearch there is a workaround, however, so assuming this problem is isolated
and unlikely to affect other code, feel free to lower the Severity if you deem
it appropriate.

Configure bugmail: http://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