Bugzilla – Bug 322423
[PATCH] Runtime should not search loaded assembly when using Assembly.Load
Last modified: 2008-02-27 11:19:58 UTC
---- Reported by gert.driesen@pandora.be 2006-10-22 05:03:50 MST ---- Currently when an assembly is loaded using Assembly.Load (AssemblyName) or Assembly.Load (string), the runtime will first search the loaded assemblies to check whether the AssemblyName of one of these matches the specified AssemblyName. This is done is mono_assembly_load_full (assembly.c). However, this behavior does not match that of MS. I'll attach patches that fix this issue, and add unit tests for it. ---- Additional Comments From vargaz@gmail.com 2006-10-22 06:08:28 MST ---- If we don't check that loaded assembly list, than we could have two assemblies with the same name inside the same appdomain, which does not seem right. ---- Additional Comments From gert.driesen@pandora.be 2006-10-22 07:06:56 MST ---- I'll check the MS behavior for this one too. ---- Additional Comments From kornelpal@gmail.com 2006-10-22 09:21:52 MST ---- I think this is a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO78464 ---- Additional Comments From gert.driesen@pandora.be 2006-10-22 11:49:21 MST ---- I've committed 2 unit test for this change in AppDomainTest.cs (one marked NotWorking for now). The Load_Loaded_Multiple test (what's in a name) verifies the behaviour when a given assembly is loaded multiple times through AppDomain.Load (AssemblyName). This test will pass on Mono and MS.NET, before and after my patch (which I'll attach in a sec). I'll also attach a small standalone test application that verifies my fix. Running this test application yields the same results on both Mono and MS.NET after applying my patch.... Except for the last test with the separate AppDomain, which is broken on the 2.0 profile after applying my patch. However, I'm pretty sure that issue is really a(nother) bug that my patch exposes in another part of Mono. I reported this regression in the 2.0 profile before: https://bugzilla.novell.com/show_bug.cgi?id=MONO76757 How do you propose to proceed with this ? The 2.0 regression in https://bugzilla.novell.com/show_bug.cgi?id=MONO76757 should definitely get fixed before the patch for this bug is applied. ---- Additional Comments From gert.driesen@pandora.be 2006-10-22 11:50:00 MST ---- Created an attachment (id=170710) (Gzipped) tar containing standalone test app ---- Additional Comments From gert.driesen@pandora.be 2006-10-22 11:50:21 MST ---- Created an attachment (id=170711) Runtime fix ---- Additional Comments From gert.driesen@pandora.be 2006-10-22 11:50:42 MST ---- Created an attachment (id=170712) Enable corlib unit test This bug depended on bug(s) 79732. Imported an attachment (id=170710) Imported an attachment (id=170711) Imported an attachment (id=170712)
*** This bug has been marked as a duplicate of bug 321202 ***