[Mono-bugs] [Bug 77596][Nor] Changed - get rid of global generics caches in metadata.c

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 20 10:55:39 EDT 2007

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 joncham at gmail.com.


--- shadow/77596	2007-07-20 10:40:30.000000000 -0400
+++ shadow/77596.tmp.3083	2007-07-20 10:55:39.000000000 -0400
@@ -273,6 +273,16 @@
 B.dll: [A]Foo<int>
 C.dll: [A]Foo<int>
 and suppose you unload 'B.dll', and unluckily enough, the cache
 contains the type allocated in B's image...
+------- Additional Comments From joncham at gmail.com  2007-07-20 10:55 -------
+"Also, in your case, the current code ensures that either type is
+removed when either of A or B is unloaded."
+Sorry if I'm misunderstanding, but isn't the problem that a
+GenericInst from B references a generic type from C (that gets
+allocated from C's mempool), and C was already unloaded (freeing it's
+mempool)? Thus when B tries to check if the type is in B (and access
+type), it's accessing freed memory?

More information about the mono-bugs mailing list