Bug 322423 (MONO79720) - [PATCH] Runtime should not search loaded assembly when using Assembly.Load
Summary: [PATCH] Runtime should not search loaded assembly when using Assembly.Load
Status: RESOLVED DUPLICATE of bug 321202
Alias: MONO79720
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 12:03 UTC by Gert Driesen
Modified: 2008-02-27 11:19 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
(Gzipped) tar containing standalone test app (3.16 KB, application/x-gzip)
2006-10-22 18:50 UTC, Thomas Wiest
Details
Runtime fix (1.04 KB, patch)
2006-10-22 18:50 UTC, Thomas Wiest
Details | Diff
Enable corlib unit test (913 bytes, patch)
2006-10-22 18:50 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:13:42 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)
Comment 1 Kornél Pál 2008-02-27 11:19:58 UTC

*** This bug has been marked as a duplicate of bug 321202 ***