Update assertions related to the number of interfaces supported by the runtime
authorJames Venning <jamie.venning@hotmail.com>
Thu, 7 Jan 2016 23:40:46 +0000 (09:40 +1000)
committerJames Venning <jamie.venning@hotmail.com>
Thu, 7 Jan 2016 23:40:46 +0000 (09:40 +1000)
mono/metadata/class.c

index c27aafb19ed6b2b350e8967425cbfda5508b43a2..60e320b6970e94c627e052492430b5ab8b21b71a 100644 (file)
@@ -2834,9 +2834,9 @@ mono_get_unique_iid (MonoClass *klass)
        }
 #endif
 
-       /* I've confirmed iids safe past 16 bits, however haven't bitset code still uses a signed
-        * int while testing. Once this changes, it should be safe for us to allow 2^32-1 interfaces. */
-       g_assert (iid <= 1000000000);
+       /* I've confirmed iids safe past 16 bits, however bitset code uses a signed int while testing.
+        * Once this changes, it should be safe for us to allow 2^32-1 interfaces, until then 2^31-2 is the max. */
+       g_assert (iid < INT_MAX);
        return iid;
 }
 
@@ -5905,7 +5905,7 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
                }
 
                /* This is required now that it is possible for more than 2^16 interfaces to exist. */
-               g_assert(icount < 65535);
+               g_assert(icount <= 65535);
 
                klass->interfaces = interfaces;
                klass->interface_count = icount;