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


           Summary: Cecil incorrectly emits assembly level attributes
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Cecil
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Assembly level attributes like

[assembly: SecurityPermission (SecurityAction.RequestMinimum, Execution=true)]
[assembly: SecurityPermission (SecurityAction.RequestOptional,
Unrestricted=true)]
[assembly: SecurityPermission (SecurityAction.RequestRefuse,
SkipVerification=true)]

are not correctly emitted. When inspecting output assembly monodis/ildasm don't
show them and they indeed does not work. But when inspecting the output
assembly I can see the XML blob is there, probably just some link is missing.

When debugging Cecil I found that MetadataToken for these attributes is always
0. Could this be the problem?

Relevant code is

DeclSecurityRow dsRow = m_rowWriter.CreateDeclSecurityRow (
    secDec.Action,
    secDecls.Container.MetadataToken,   <------ 0 for assembly attributes
    m_mdWriter.AddBlob (secDec.Resolved ?
        m_mod.GetAsByteArray (secDec) : secDec.Blob));

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to