Skip to contentSkip to conversation

tcg patch queue

GIT PULL Applied Richard Henderson 2 participants 3 messages Jun 12 – Jun 15

lore
Share & tools
lore
#0 lore raw

The following changes since commit 193963218accbcf65f28ab1efa773ac6d1cc634c:

Merge tag 'pull-ufs-20260612' of https://gitlab.com/jeuk20.kim/qemu into staging (2026-06-12 09:01:07 -0400)

are available in the Git repository at:

https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20260612

for you to fetch changes up to f6ff5ec21e16aeb1d283e13d0fdc13fcfb712af4:

tcg: Silence ubsan error on tcg_splitwx_diff causing overflow (2026-06-12 08:52:59 -0700)

----------------------------------------------------------------
tcg: Silence ubsan error on tcg_splitwx_diff causing overflow

----------------------------------------------------------------
Fabiano Rosas (1):
tcg: Silence ubsan error on tcg_splitwx_diff causing overflow

 include/tcg/tcg.h | 2 +-
 tcg/tcg.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
#1 lore raw

[PULL 1/1] tcg: Silence ubsan error on tcg_splitwx_diff causing overflow

From: Fabiano Rosas <[email protected]>

UBSAN complains:
runtime error: addition of unsigned offset to 0x7bc06e1f5000 overflowed to 0x7bc02e1f5000

Change tcg_splitwx_diff to ptrdiff_t and silence the error.

Message-ID: <[email protected]>

---
 include/tcg/tcg.h | 2 +-
 tcg/tcg.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/tcg/tcg.h +1 -1
index 45c7e118c3..7669dc1c2d 100644
@@ -447,7 +447,7 @@ static inline bool temp_readonly(TCGTemp *ts)
 
 extern __thread TCGContext *tcg_ctx;
 extern const void *tcg_code_gen_epilogue;
-extern uintptr_t tcg_splitwx_diff;
+extern ptrdiff_t tcg_splitwx_diff;
 extern TCGv_env tcg_env;
 
 bool in_code_gen_buffer(const void *p);
tcg/tcg.c +1 -1
index 2ca44766f6..1e77f2365a 100644
@@ -244,7 +244,7 @@ unsigned int tcg_cur_ctxs;
 unsigned int tcg_max_ctxs;
 TCGv_env tcg_env;
 const void *tcg_code_gen_epilogue;
-uintptr_t tcg_splitwx_diff;
+ptrdiff_t tcg_splitwx_diff;
 
 #ifndef CONFIG_TCG_INTERPRETER
 tcg_prologue_fn *tcg_qemu_tb_exec;
Signature · 1 line
2.43.0