Skip to content

Commit 2128e01

Browse files
committed
Init tcg region buffer
1 parent 76d97f8 commit 2128e01

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

qemu/tcg/tcg.c

+7
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,14 @@ void tcg_region_init(TCGContext *tcg_ctx)
538538
}
539539

540540
tcg_ctx->tree = g_tree_new(tb_tc_cmp);
541+
// Unicorn: Though this code is taken from CONFIG_USER_ONLY, it is crucial or
542+
// tcg_ctx->region.current is 0 and we will miss a tb_flush when the
543+
// buffer gets full.
544+
{
545+
bool err = tcg_region_initial_alloc__locked(tcg_ctx);
541546

547+
g_assert(!err);
548+
}
542549
}
543550

544551
/*

0 commit comments

Comments
 (0)