More verbose error message when sgen_register_fixed_internal_mem_type fails
[mono.git] / mono / sgen / sgen-internal.c
index ccff562737ab4deac9515b83c266f95147ebf36d..12ace19a3e904e4782f5bdc8febd21709cb3e78d 100644 (file)
@@ -96,8 +96,10 @@ sgen_register_fixed_internal_mem_type (int type, size_t size)
 
        if (fixed_type_allocator_indexes [type] == -1)
                fixed_type_allocator_indexes [type] = slot;
-       else
-               g_assert (fixed_type_allocator_indexes [type] == slot);
+       else {
+               if (fixed_type_allocator_indexes [type] != slot)
+                       g_error ("Invalid double registration of type %d old slot %d new slot %d", type, fixed_type_allocator_indexes [type], slot);
+       }
 }
 
 static const char*