[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/16] tcg: Return NULL temp for TCG_CALL_DUMMY_
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 07/16] tcg: Return NULL temp for TCG_CALL_DUMMY_ARG |
Date: |
Tue, 27 Jun 2017 09:47:22 +0100 |
User-agent: |
mu4e 0.9.19; emacs 25.2.50.3 |
Richard Henderson <address@hidden> writes:
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> tcg/tcg.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tcg/tcg.h b/tcg/tcg.h
> index 3b35344..6c357e7 100644
> --- a/tcg/tcg.h
> +++ b/tcg/tcg.h
> @@ -730,7 +730,7 @@ extern bool parallel_cpus;
>
> static inline TCGTemp *arg_temp(TCGArg a)
> {
> - return &tcg_ctx.temps[a];
> + return a == TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[a];
> }
It doesn't look like a lot of calls to arg_temp are able to deal with a
NULL return and may well immediately deref the value. Are we sure the
cases the TCG_CALL_DUMMY arg is involved are narrowly defined?
>
> static inline void tcg_set_insn_param(int op_idx, int arg, TCGArg v)
--
Alex Bennée
- Re: [Qemu-devel] [PATCH 01/16] tcg: Merge opcode arguments into TCGOp, (continued)
- [Qemu-devel] [PATCH 04/16] tcg: Propagate TCGOp down to allocators, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 03/16] tcg: Propagate args to op->args in tcg.c, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 06/16] tcg: Add temp_global bit to TCGTemp, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 07/16] tcg: Return NULL temp for TCG_CALL_DUMMY_ARG, Richard Henderson, 2017/06/20
- Re: [Qemu-devel] [PATCH 07/16] tcg: Return NULL temp for TCG_CALL_DUMMY_ARG,
Alex Bennée <=
- [Qemu-devel] [PATCH 02/16] tcg: Propagate args to op->args in optimizer, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 05/16] tcg: Introduce arg_temp, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 10/16] tcg: Avoid loops against variable bounds, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 11/16] tcg: Change temp_allocate_frame arg to TCGTemp, Richard Henderson, 2017/06/20
- [Qemu-devel] [PATCH 09/16] tcg: Use per-temp state data in liveness, Richard Henderson, 2017/06/20