[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 19/45] tcg: Fix info_in_idx increment in layout_arg_by_ref
From: |
Richard Henderson |
Subject: |
[PATCH 19/45] tcg: Fix info_in_idx increment in layout_arg_by_ref |
Date: |
Sun, 9 Jul 2023 19:28:50 +0100 |
Off by one error, failing to take into account that layout_arg_1
already incremented info_in_idx for the first piece. We only
need care for the n-1 TCG_CALL_ARG_BY_REF_N pieces here.
Cc: qemu-stable@nongnu.org
Fixes: 313bdea84d2 ("tcg: Add TCG_CALL_{RET,ARG}_BY_REF")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1751
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
tcg/tcg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index a0628fe424..652e8ea6b9 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1083,7 +1083,7 @@ static void layout_arg_by_ref(TCGCumulativeArgs *cum,
TCGHelperInfo *info)
.ref_slot = cum->ref_slot + i,
};
}
- cum->info_in_idx += n;
+ cum->info_in_idx += n - 1; /* i=0 accounted for in layout_arg_1 */
cum->ref_slot += n;
}
--
2.34.1
- [PATCH 14/45] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for microblaze, (continued)
- [PATCH 14/45] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for microblaze, Richard Henderson, 2023/07/09
- [PATCH 15/45] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for nios2, Richard Henderson, 2023/07/09
- [PULL 16/37] target/ppc: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/07/09
- [PULL 15/37] target/ppc: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PATCH 16/45] linux-user/syscall: Implement execve without execveat, Richard Henderson, 2023/07/09
- [PATCH 17/45] linux-user: Fix do_shmat type errors, Richard Henderson, 2023/07/09
- [PULL 17/37] target/ppc: Use aesenc_SB_SR_MC_AK, Richard Henderson, 2023/07/09
- [PATCH 18/45] accel/tcg: Split out cpu_exec_longjmp_cleanup, Richard Henderson, 2023/07/09
- [PULL 18/37] target/ppc: Use aesdec_ISB_ISR_AK_IMC, Richard Henderson, 2023/07/09
- [PULL 19/37] target/i386: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PATCH 19/45] tcg: Fix info_in_idx increment in layout_arg_by_ref,
Richard Henderson <=
- [PATCH 20/45] linux-user: Make sure initial brk(0) is page-aligned, Richard Henderson, 2023/07/09
- [PATCH 21/45] linux-user: Fix formatting of mmap.c, Richard Henderson, 2023/07/09
- [PULL 21/37] target/i386: Use aesdec_IMC, Richard Henderson, 2023/07/09
- [PULL 20/37] target/i386: Use aesdec_ISB_ISR_AK, Richard Henderson, 2023/07/09
- [PATCH 23/45] linux-user: Split TARGET_MAP_* out of syscall_defs.h, Richard Henderson, 2023/07/09
- [PULL 25/37] target/arm: Use aesenc_SB_SR_AK, Richard Henderson, 2023/07/09
- [PATCH 26/45] accel/tcg: Introduce page_check_range_empty, Richard Henderson, 2023/07/09
- [PULL 22/37] target/i386: Use aesenc_SB_SR_MC_AK, Richard Henderson, 2023/07/09
- [PULL 24/37] target/arm: Demultiplex AESE and AESMC, Richard Henderson, 2023/07/09
- [PULL 28/37] target/arm: Use aesdec_IMC, Richard Henderson, 2023/07/09