Skip to content

Commit 376bc15

Browse files
pbo-linarostsquad
authored andcommitted
tests/tcg/plugins/mem: fix 32-bit build
Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Pierrick Bouvier <[email protected]> Message-Id: <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]>
1 parent b2a3ebb commit 376bc15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/tcg/plugins/mem.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ static void update_region_info(uint64_t region, uint64_t offset,
135135
g_assert(offset + size <= region_size);
136136

137137
g_mutex_lock(&lock);
138-
ri = (RegionInfo *) g_hash_table_lookup(regions, GUINT_TO_POINTER(region));
138+
ri = (RegionInfo *) g_hash_table_lookup(regions, &region);
139139

140140
if (!ri) {
141141
ri = g_new0(RegionInfo, 1);
142142
ri->region_address = region;
143143
ri->data = g_malloc0(region_size);
144144
ri->seen_all = true;
145-
g_hash_table_insert(regions, GUINT_TO_POINTER(region), (gpointer) ri);
145+
g_hash_table_insert(regions, &ri->region_address, ri);
146146
}
147147

148148
if (is_store) {
@@ -392,7 +392,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id,
392392

393393
if (do_region_summary) {
394394
region_mask = (region_size - 1);
395-
regions = g_hash_table_new(NULL, g_direct_equal);
395+
regions = g_hash_table_new(g_int64_hash, g_int64_equal);
396396
}
397397

398398
counts = qemu_plugin_scoreboard_new(sizeof(CPUCount));

0 commit comments

Comments
 (0)