[Mono-bugs] [Bug 519005] New: 'gmcs' added to an assembly's assemblyref table when presumably using exception throwing in a anonymous method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 2 18:27:12 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=519005


           Summary: 'gmcs' added to an assembly's assemblyref table when
                    presumably using exception throwing in a anonymous
                    method
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: OES - Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jeremie.laval at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1)
Gecko/20090701 Shiretoko/3.5

When I compile a C# library with MonoDevelop I strangely get 'gmcs' added in
the assembly's assemblyref table. I narrowed this down to this line of code
which causes the 'gmcs' adding :

Task t = Task.Factory.StartNew(delegate {throw new Exception("foo"); });

Thus I would say this bug is caused by the exception inside the anonymous
method.

Reproducible: Always

Steps to Reproduce:
1. Use the line of code above
2. Compile
3. Try to run the assembly or monodis on it
Actual Results:  
When MonoDevelop wants to use the assembly it fails and outputs :

** (/home/jeremie/mono/monodevelop/main/build/bin/mdhost.exe:32084): WARNING
**: The following assembly referenced from
/home/jeremie/Projects/parallelfx/ParallelFxTests/bin/Debug/ParallelFxTests.dll
could not be loaded:
     Assembly:   gmcs    (assemblyref_index=4)
     Version:    2.5.0.0
     Public Key: (none)
The assembly was not found in the Global Assembly Cache, a path listed in the
MONO_PATH environment variable, or in the location of the executing assembly
(/home/jeremie/Projects/parallelfx/ParallelFxTests/bin/Debug/).

When I compile the assembly with the line above, monodis reports :

jeremie Debug (master)  $ monodis --assemblyref ParallelFxTests.dll
AssemblyRef Table
1: Version=2.0.0.0
    Name=mscorlib
    Flags=0x00000000
    Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89 
2: Version=1.0.3470.42817
    Name=System.Threading
    Flags=0x00000000
    Zero sized public key
3: Version=3.5.0.0
    Name=System.Core
    Flags=0x00000000
    Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89 
4: Version=2.4.8.0
    Name=nunit.framework
    Flags=0x00000000
    Public Key:
0x00000000: 96 D0 9A 1E B7 F4 4A 77 
5: Version=2.5.0.0
    Name=gmcs
    Flags=0x00000000
    Zero sized public key
6: Version=2.0.0.0
    Name=System.Xml
    Flags=0x00000000
    Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89

Expected Results:  
With the line commented, monodis reports :

jeremie Debug (master)  $ monodis --assemblyref ParallelFxTests.dll
AssemblyRef Table
1: Version=2.0.0.0
    Name=mscorlib
    Flags=0x00000000
    Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89 
2: Version=1.0.3470.42817
    Name=System.Threading
    Flags=0x00000000
    Zero sized public key
3: Version=3.5.0.0
    Name=System.Core
    Flags=0x00000000
    Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89 
4: Version=2.4.8.0
    Name=nunit.framework
    Flags=0x00000000
    Public Key:
0x00000000: 96 D0 9A 1E B7 F4 4A 77 
5: Version=2.0.0.0
    Name=System.Xml
    Flags=0x00000000
    Public Key:
0x00000000: B7 7A 5C 56 19 34 E0 89

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