[checked] Imageset may reference corlib implicitly in another imageset.
authorAleksey Kliger <aleksey@xamarin.com>
Mon, 28 Dec 2015 16:49:14 +0000 (11:49 -0500)
committerAleksey Kliger <aleksey@xamarin.com>
Mon, 28 Dec 2015 16:49:14 +0000 (11:49 -0500)
mono/utils/checked-build.c

index 5c4fd4249e9acd79cd6635d5a0bd82504be451f2..65bff4d26fba514ac65af3529cc1042adb631e43 100644 (file)
@@ -432,6 +432,12 @@ check_image_set_may_reference_image_set (MonoImageSet *from, MonoImageSet *to)
        {
                gboolean seen = FALSE;
 
+               // If TO set includes corlib, the FROM set may
+               // implicitly reference corlib, even if it's not
+               // present in the set explicitly.
+               if (to->images[to_idx] == mono_defaults.corlib)
+                       seen = TRUE;
+
                // For each item in to->images, scan over from->images looking for it.
                for (from_idx = 0; !seen && from_idx < from->nimages; from_idx++)
                {