[Mono-bugs] [Bug 67727][Wis] New - same assembly cant be loaded twice
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 6 Oct 2004 20:07:02 -0400 (EDT)
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 ddulai@bloomberg.net.
http://bugzilla.ximian.com/show_bug.cgi?id=67727
--- shadow/67727 2004-10-06 20:07:02.000000000 -0400
+++ shadow/67727.tmp.20193 2004-10-06 20:07:02.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 67727
+Product: Mono: Runtime
+Version: unspecified
+OS: All
+OS Details: linux or windows
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ddulai@bloomberg.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: same assembly cant be loaded twice
+
+I am trying to load an assembly twice. This may
+seem silly at first sight, but the circumstances
+I'm doing it in are allowed and work perfectly in
+the Microsoft .NET runtime.
+
+What I'm doing is loading 2 assemblies, each a
+different file, with the same Assembly name, into
+2 different AppDomains. The AppDomain is supposed
+to be a boundary between Assembly loads. Mono does
+not seem to treat the AppDomain that way, and thus
+I'm finding it impossible to use Mono as an
+application server that can load multiple versions
+of the same application.
+
+In mono_assembly_load_from() in assembly.c, the
+follow comment exists:
+
+/* avoid loading the same assembly twice for now... */
+if ((ass2 = search_loaded (&ass->aname))) {
+...
+return ass2;
+}
+
+The problem here is that search_loaded() checks a
+global static GList* called loaded_assemblies to
+see if the Assembly is loaded already, and if so,
+it doesn't reload it. This shouldn't be checked
+globally, but should be checked within the context
+of an AppDomain.
+
+Bug #65903 is similar, but had additional stuff
+that was fixed already. It also contains code on
+how to reproduce this.