On 8 March 2014 16:09, Luiz Capitulino <lcapitul...@redhat.com> wrote:
> On Sat, 8 Mar 2014 14:40:27 +0000
> Peter Maydell <peter.mayd...@linaro.org> wrote:
>
>> The test-qmp-commands test binary seems to read from freed
>> memory. This triggers the MacOSX malloc implementation's
>> assertions. git bisect blames
>
> Can you try the patch below? For the clang ones, I'll have to install it etc,
> so it will take a bit longer.
>
> I wonder how this didn't explode...
>
> diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c
> index 8e62c2d..554e222 100644
> --- a/tests/test-qmp-commands.c
> +++ b/tests/test-qmp-commands.c
> @@ -141,7 +141,7 @@ static void test_dispatch_cmd_io(void)
>
>      ret3 = qobject_to_qint(test_qmp_dispatch(req));
>      assert(qint_get_int(ret3) == 66);
> -    QDECREF(ret);
> +    QDECREF(ret3);
>
>      QDECREF(req);
>  }

Yep, seems to work (both MacOSX and valgrind are happier).

Tested-by: Peter Maydell <peter.mayd...@linaro.org>

-- PMM

Reply via email to