Skip to content

Commit c3c0a97

Browse files
committed
Component linking fix
1 parent 1921281 commit c3c0a97

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/mono/mono/metadata/metadata-internals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ typedef struct {
11471147
MonoTableInfo *t; /* pointer to the table */
11481148

11491149
// optimization data
1150-
gboolean metadata_has_updates;
1150+
gint32 metadata_has_updates; // -1: uninitialized. 0/1: value
11511151
const char * t_base;
11521152
guint t_row_size;
11531153
guint32 t_rows;
@@ -1173,7 +1173,7 @@ locator_init (MonoTableInfo *t, guint32 idx, guint32 col_idx)
11731173
return result;
11741174

11751175
// optimization data for decode_locator_row
1176-
result.metadata_has_updates = mono_metadata_has_updates ();
1176+
result.metadata_has_updates = -1;
11771177
result.t_base = t->base;
11781178
result.t_row_size = t->row_size;
11791179
result.t_rows = table_info_get_rows (t);

src/mono/mono/metadata/metadata.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4684,7 +4684,9 @@ decode_locator_row (locator_t *loc, int row_index)
46844684
{
46854685
const char *data;
46864686

4687-
if (G_UNLIKELY (loc->metadata_has_updates))
4687+
if (G_UNLIKELY (loc->metadata_has_updates < 0))
4688+
loc->metadata_has_updates = mono_metadata_has_updates ();
4689+
if (G_UNLIKELY (loc->metadata_has_updates > 0))
46884690
return mono_metadata_decode_row_col_slow (loc->t, row_index, loc->col_idx);
46894691

46904692
// g_assert (col < mono_metadata_table_count (bitfield));

0 commit comments

Comments
 (0)