[Qemu-devel] [PATCH] target/m68k: fix TCG variable double free

Laurent Vivier posted 1 patch 6 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180119114444.7590-1-laurent@vivier.eu
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppc passed
Test s390x passed
target/m68k/translate.c | 1 -
1 file changed, 1 deletion(-)
[Qemu-devel] [PATCH] target/m68k: fix TCG variable double free
Posted by Laurent Vivier 6 years, 2 months ago
t64 is also unconditionally freed after the switch () { ... }

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/m68k/translate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index f0e86a73d4..ea18df940a 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -969,7 +969,6 @@ static void gen_load_fp(DisasContext *s, int opsize, TCGv addr, TCGv_ptr fp)
     case OS_DOUBLE:
         tcg_gen_qemu_ld64(t64, addr, index);
         gen_helper_extf64(cpu_env, fp, t64);
-        tcg_temp_free_i64(t64);
         break;
     case OS_EXTENDED:
         if (m68k_feature(s->env, M68K_FEATURE_CF_FPU)) {
-- 
2.14.3


Re: [Qemu-devel] [PATCH] target/m68k: fix TCG variable double free
Posted by Thomas Huth 6 years, 2 months ago
On 19.01.2018 12:44, Laurent Vivier wrote:
> t64 is also unconditionally freed after the switch () { ... }
> 
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  target/m68k/translate.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/target/m68k/translate.c b/target/m68k/translate.c
> index f0e86a73d4..ea18df940a 100644
> --- a/target/m68k/translate.c
> +++ b/target/m68k/translate.c
> @@ -969,7 +969,6 @@ static void gen_load_fp(DisasContext *s, int opsize, TCGv addr, TCGv_ptr fp)
>      case OS_DOUBLE:
>          tcg_gen_qemu_ld64(t64, addr, index);
>          gen_helper_extf64(cpu_env, fp, t64);
> -        tcg_temp_free_i64(t64);
>          break;
>      case OS_EXTENDED:
>          if (m68k_feature(s->env, M68K_FEATURE_CF_FPU)) {
> 

Reviewed-by: Thomas Huth <huth@tuxfamily.org>

Re: [Qemu-devel] [PATCH] target/m68k: fix TCG variable double free
Posted by Richard Henderson 6 years, 2 months ago
On 01/19/2018 03:44 AM, Laurent Vivier wrote:
> t64 is also unconditionally freed after the switch () { ... }
> 
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  target/m68k/translate.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~