[Mono-bugs] [Bug 684342] New: Optional Decimal Param Causes Compiler Crash If default value does not end with "m"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Mar 31 23:18:25 EDT 2011



           Summary: Optional Decimal Param Causes Compiler Crash If
                    default value does not end with "m"
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.10.x
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: dustin at biztechetc.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: Yes

Description of Problem:
NET 4 introduced parameters with default values.  Using a decimal type
parameter with a default value of any number causes a compile crash.

Steps to reproduce the problem:
1. enter function:         void TestFunction(decimal amt = 1)
2. Compile and see crash

Actual Results:


  at (wrapper managed-to-native)
  at System.Reflection.Emit.TypeBuilder.CreateType () <0x003e7>
  at Mono.CSharp.TypeContainer.CloseType () <0x001c3>
  at Mono.CSharp.ModuleContainer.CloseType () <0x00072>
  at Mono.CSharp.Driver.Compile () <0x005e1>
  at Mono.CSharp.Driver.Main (string[]) <0x000bf>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    /usr/bin/mono-sgen() [0x490b86]
    /lib/libpthread.so.0(+0xf150) [0x7f0dd7f55150]
    /lib/libc.so.6(gsignal+0x35) [0x7f0dd7c17655]
    /lib/libc.so.6(abort+0x186) [0x7f0dd7c18ad6]
    /usr/bin/mono-sgen() [0x5e160f]
    /usr/bin/mono-sgen() [0x5e1693]
    /usr/bin/mono-sgen() [0x4f69a1]
    /usr/bin/mono-sgen() [0x4fbb0a]
    /usr/bin/mono-sgen() [0x4fc4cb]
    /usr/bin/mono-sgen() [0x501521]
    /usr/bin/mono-sgen() [0x50b480]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0x7f0dd61f2700 (LWP 20228)]
0x00007f0dd7f542bd in read () from /lib/libpthread.so.0
  2 Thread 0x7f0dd61f2700 (LWP 20228)  0x00007f0dd7f534f0 in sem_wait () from
* 1 Thread 0x7f0dd89ea780 (LWP 20225)  0x00007f0dd7f542bd in read () from

Expected Results:
Successful compile

How often does this happen? 
Every time

Additional Information:

This compiles fine if you change to:
void TestFunction(decimal amt = 1m)

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