From: Richard Henderson <[email protected]> This pointer needs to be reset after overflow just like code_buf and code_ptr.
Cc: [email protected] Fixes: 57a269469db ("tcg: Infrastructure for managing constant pools") Acked-by: Alistair Francis <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> Reviewed-by: LIU Zhiwei <[email protected]> Signed-off-by: Richard Henderson <[email protected]> (cherry picked from commit a7cfd751fb269de4a93bf1658cb13911c7ac77cc) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/tcg/tcg.c b/tcg/tcg.c index 436fcf6ebd..e7aa02c447 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -716,7 +716,6 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s) goto retry; } qatomic_set(&s->code_gen_ptr, next); - s->data_gen_ptr = NULL; return tb; } @@ -4249,6 +4248,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, target_ulong pc_start) */ s->code_buf = tcg_splitwx_to_rw(tb->tc.ptr); s->code_ptr = s->code_buf; + s->data_gen_ptr = NULL; #ifdef TCG_TARGET_NEED_LDST_LABELS QSIMPLEQ_INIT(&s->ldst_labels); -- 2.39.5
