https://bugzilla.novell.com/show_bug.cgi?id=466474


           Summary: mcs doesn't emit declsec entry for unsafe code
    Classification: Mono
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Compile this program with csc and mcs:

using System;

public class Foo{
static int foo;
public static unsafe void A() {
fixed (int *x = &foo) { Console.WriteLine ((IntPtr)x); }
}
public static void B() {}
public static void Main () { B(); A(); }
}


CSC:
assembly 'dd'
{
  .custom instance void class
[mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::'.ctor'(int32)
=  (01 00 08 00 00 00 00 00 ) // ........

  .custom instance void class
[mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'()
=  (
                01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   //
...T..WrapNonEx
                63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) //
ceptionThrows.

  .permissionset reqmin =
{[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property
bool 'SkipVerification' = bool(true)}}
  .hash algorithm 0x00008004
  .ver  0:0:0:0
}
module dd.exe // GUID = {A7837D77-BC44-4D4E-A9DF-9AA51A6A5EAF}

custom instance void class
[mscorlib]System.Security.UnverifiableCodeAttribute::'.ctor'() =  (01 00 00 00
) // .


Under mcs:
assembly 'dd'
{
  .custom instance void class
[mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'()
=  (
                01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   //
...T..WrapNonEx
                63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01       ) //
ceptionThrows.

  .hash algorithm 0x00008004
  .ver  0:0:0:0
}
module dd.exe // GUID = {53A5AAFA-784D-46FD-8CFE-0FA4B5ED69DE}

custom instance void class
[mscorlib]System.Security.UnverifiableCodeAttribute::'.ctor'() =  (01 00 00 00
) // .

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to