Skip to content

Commit

Permalink
Merge pull request #1809 from kumpera/double_loading_fix
Browse files Browse the repository at this point in the history
[runtime] Avoid allocating interface offsets multiple times. Fixes #28398
  • Loading branch information
kumpera committed May 17, 2015
2 parents b427092 + 972f726 commit 0b45503
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mono/metadata/class.c
Expand Up @@ -3621,8 +3621,9 @@ setup_interface_offsets (MonoClass *class, int cur_slot, gboolean overwrite)
* mono_class_setup_interface_offsets () passes 0 as CUR_SLOT, so the computed interface offsets will be invalid. This
* means we have to overwrite those when called from other places (#4440).
*/
if (class->interfaces_packed && !overwrite) {
g_assert (class->interface_offsets_count == interface_offsets_count);
if (class->interfaces_packed) {
if (!overwrite)
g_assert (class->interface_offsets_count == interface_offsets_count);
} else {
uint8_t *bitmap;
int bsize;
Expand Down

0 comments on commit 0b45503

Please sign in to comment.