Fix imageset->imageset audits in checked-build "metadata" mode
commit6ae19856884dc52d841136af2af3cea196c89cd9
authorAndi McClure <andi.mcclure@xamarin.com>
Thu, 22 Sep 2016 16:27:43 +0000 (22 12:27 -0400)
committerAndi McClure <andi.mcclure@xamarin.com>
Thu, 22 Sep 2016 18:27:23 +0000 (22 14:27 -0400)
tree50e1405e2129879721d1fd95f0afd796b6371dc1
parentfe9ac011d4fc1c82f51b2774521c485148688898
Fix imageset->imageset audits in checked-build "metadata" mode

An imageset can reference another imageset if every image in the "to"
imageset is referenced by some image in the "from" imageset.
Previously the checked build code was requiring the stricter criteria
of every image in the "to" imageset being present in the "from"
imageset, which was not only inconsistent with image->imageset and
imageset->image reference checking, but lead to spurious failures.

An example of a scenario where the previous check logic would fail is:
Assembly A:
class ClassA<T>
Assembly B:
class ClassB<T> extends ClassA<T>, ClassB2
Attempting to run the constructor for ClassB<ClassB2> would result in
a pointer to memory in imageset [A,B] being written into a structure
located in imageset [B]. This is valid since B references A, however
the MONO_CHECK_MODE=metadata checker would flag it as an error.
mono/utils/checked-build.c