* [PATCH for-5.1] target/hppa: Free some temps in do_sub
@ 2020-07-20 17:40 Richard Henderson
2020-07-20 17:48 ` Philippe Mathieu-Daudé
2020-07-20 20:55 ` svens
0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2020-07-20 17:40 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, svens, qemu-stable
Two temps allocated but not freed. Do enough subtractions
within a single TB and one can run out of temps entirely.
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1880287
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 52d7bea1ea..4bd22d4820 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1294,6 +1294,8 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1,
save_or_nullify(ctx, cpu_psw_cb_msb, cb_msb);
save_gpr(ctx, rt, dest);
tcg_temp_free(dest);
+ tcg_temp_free(cb);
+ tcg_temp_free(cb_msb);
/* Install the new nullification. */
cond_free(&ctx->null_cond);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-5.1] target/hppa: Free some temps in do_sub
2020-07-20 17:40 [PATCH for-5.1] target/hppa: Free some temps in do_sub Richard Henderson
@ 2020-07-20 17:48 ` Philippe Mathieu-Daudé
2020-07-20 20:55 ` svens
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-20 17:48 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: deller, svens, qemu-stable
On 7/20/20 7:40 PM, Richard Henderson wrote:
> Two temps allocated but not freed. Do enough subtractions
> within a single TB and one can run out of temps entirely.
>
> Cc: qemu-stable@nongnu.org
Fixes: b2167459ae ("target-hppa: Implement basic arithmetic")
> Buglink: https://bugs.launchpad.net/qemu/+bug/1880287
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> target/hppa/translate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/hppa/translate.c b/target/hppa/translate.c
> index 52d7bea1ea..4bd22d4820 100644
> --- a/target/hppa/translate.c
> +++ b/target/hppa/translate.c
> @@ -1294,6 +1294,8 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1,
> save_or_nullify(ctx, cpu_psw_cb_msb, cb_msb);
> save_gpr(ctx, rt, dest);
> tcg_temp_free(dest);
> + tcg_temp_free(cb);
> + tcg_temp_free(cb_msb);
>
> /* Install the new nullification. */
> cond_free(&ctx->null_cond);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-5.1] target/hppa: Free some temps in do_sub
2020-07-20 17:40 [PATCH for-5.1] target/hppa: Free some temps in do_sub Richard Henderson
2020-07-20 17:48 ` Philippe Mathieu-Daudé
@ 2020-07-20 20:55 ` svens
1 sibling, 0 replies; 3+ messages in thread
From: svens @ 2020-07-20 20:55 UTC (permalink / raw)
To: Richard Henderson; +Cc: deller, qemu-devel, qemu-stable
Hi,
On Mon, Jul 20, 2020 at 10:40:39AM -0700, Richard Henderson wrote:
> Two temps allocated but not freed. Do enough subtractions
> within a single TB and one can run out of temps entirely.
>
> Cc: qemu-stable@nongnu.org
> Buglink: https://bugs.launchpad.net/qemu/+bug/1880287
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/hppa/translate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/hppa/translate.c b/target/hppa/translate.c
> index 52d7bea1ea..4bd22d4820 100644
> --- a/target/hppa/translate.c
> +++ b/target/hppa/translate.c
> @@ -1294,6 +1294,8 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1,
> save_or_nullify(ctx, cpu_psw_cb_msb, cb_msb);
> save_gpr(ctx, rt, dest);
> tcg_temp_free(dest);
> + tcg_temp_free(cb);
> + tcg_temp_free(cb_msb);
>
> /* Install the new nullification. */
> cond_free(&ctx->null_cond);
> --
> 2.25.1
>
Tested-by: Sven Schnelle <svens@stackframe.org>
Regards
Sven
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-20 20:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 17:40 [PATCH for-5.1] target/hppa: Free some temps in do_sub Richard Henderson
2020-07-20 17:48 ` Philippe Mathieu-Daudé
2020-07-20 20:55 ` svens
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.