Bugzilla – Bug 316835
[PATCH] AppDomain.Evidence call crashes.
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by miguel@ximian.com 2005-01-08 18:44:33 MST ---- Calling AppDomain.Evidence crashes on a newly created AppDomain, the following program should return 0, currently crashes: using System; class D { public static int Main () { AppDomain ad; ad = AppDomain.CreateDomain ("CreateDomain_String"); if (ad == null) return 1; if (ad.Evidence == null) return 2; return 0; } } This is part of the regression test suite, one of the errors that fails. The problem seems to be that AppDomain.DefaultDomain returns null, so the next derefence to Evidence in AppDomain.cs, line 141 crashes. Am assigning to Sebastien, as svn annotate puts the code on his area. ---- Additional Comments From miguel@ximian.com 2005-01-08 18:45:42 MST ---- A fix for this would fix another three regressions in the mscorlib test suite. ---- Additional Comments From grompf@sublimeintervention.com 2005-01-08 19:19:24 MST ---- I cannot replicate this on SVN HEAD (PPC) -kangaroo ---- Additional Comments From sebastien@ximian.com 2005-01-08 19:35:28 MST ---- I can replicate on x86. It seems my assumption that appdomain #0 was the root domain is no longer (or not always) true. I'll change the icall to return the root appdomain (as it doesn't seems we can get an AppDomain by it's Id anyway). ---- Additional Comments From sebastien@ximian.com 2005-01-08 19:44:33 MST ---- Here's two patches, one for metadata and one for AppDomain.cs. They fix the previous test case and 3 unit tests failures: - System.AppDomainTest.CreateDomain_String - System.AppDomainTest.CreateDomain_StringEvidenceNull - System.AppDomainTest.CreateDomain_StringEvidenceNullAppDomainSetup Note: as this changes (removal/add) an icall we'll need to bump corlib's version when applying the patch. ---- Additional Comments From sebastien@ximian.com 2005-01-08 19:45:04 MST ---- Created an attachment (id=167233) AppDomain.diff ---- Additional Comments From sebastien@ximian.com 2005-01-08 19:48:15 MST ---- Created an attachment (id=167234) metadata.diff ---- Additional Comments From sebastien@ximian.com 2005-01-08 20:24:34 MST ---- Reviewed by Zoltan. Fixed in SVN (bumping corlib's version wasn't required). Imported an attachment (id=167233) Imported an attachment (id=167234) Unknown operating system unknown. Setting to default OS "Other".