[Mono-bugs] [Bug 71675][Nor] New - MCS doesn't encode unrestricted permission correctly
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 24 Jan 2005 11:56:15 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by sebastien@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=71675
--- shadow/71675 2005-01-24 11:56:15.000000000 -0500
+++ shadow/71675.tmp.15135 2005-01-24 11:56:15.000000000 -0500
@@ -0,0 +1,70 @@
+Bug#: 71675
+Product: Mono: Compilers
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: sebastien@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS doesn't encode unrestricted permission correctly
+
+Description of Problem:
+MCS encodes all unrestricted permission as an unrestricted permission set.
+I.e. we lose the permission (when present) that is unrestricted.
+
+
+Steps to reproduce the problem:
+1. Compile the following source code with MCS
+
+using System;
+using System.Security.Permissions;
+
+public class Program {
+
+ [EnvironmentPermission (SecurityAction.Demand, Unrestricted=true)]
+ static public int Main (string[] args)
+ {
+ return 0;
+ }
+}
+
+2. Disassemble with monodis
+
+
+Actual Results:
+ .permissionset demand = (
+ 3C 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // <.P.e.r.m.i.s.s.
+ 69 00 6F 00 6E 00 53 00 65 00 74 00 20 00 63 00 // i.o.n.S.e.t. .c.
+ 6C 00 61 00 73 00 73 00 3D 00 22 00 53 00 79 00 // l.a.s.s.=.".S.y.
+ 73 00 74 00 65 00 6D 00 2E 00 53 00 65 00 63 00 // s.t.e.m...S.e.c.
+ 75 00 72 00 69 00 74 00 79 00 2E 00 50 00 65 00 // u.r.i.t.y...P.e.
+ 72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n.
+ 53 00 65 00 74 00 22 00 0A 00 20 00 20 00 20 00 // S.e.t."... . . .
+ 20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00 // . . . . . . . .
+ 20 00 20 00 20 00 20 00 76 00 65 00 72 00 73 00 // . . . .v.e.r.s.
+ 69 00 6F 00 6E 00 3D 00 22 00 31 00 22 00 0A 00 // i.o.n.=.".1."...
+ 20 00 20 00 20 00 20 00 20 00 20 00 20 00 20 00 // . . . . . . . .
+ 20 00 20 00 20 00 20 00 20 00 20 00 20 00 55 00 // . . . . . . .U.
+ 6E 00 72 00 65 00 73 00 74 00 72 00 69 00 63 00 // n.r.e.s.t.r.i.c.
+ 74 00 65 00 64 00 3D 00 22 00 74 00 72 00 75 00 // t.e.d.=.".t.r.u.
+ 65 00 22 00 2F 00 3E 00 0A 00 ) // e."./.>...
+
+
+Expected Results:
+The permission set shouldn't include an unrestricted EnvironmentPermission
+and shouldn't (itself) be unrestricted.
+
+
+How often does this happen?
+Always.
+
+
+Additional Information: