[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] test-coroutine: Fix coroutine pool corruption
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH] test-coroutine: Fix coroutine pool corruption |
Date: |
Thu, 11 Aug 2016 09:46:26 +0100 |
User-agent: |
Mutt/1.6.2 (2016-07-01) |
On Wed, Aug 10, 2016 at 01:17:27PM +0200, Kevin Wolf wrote:
> The test case overwrites the Coroutine object with 0xff as a way to
> assert that the coroutine isn't used any more. However, this means that
> the coroutine pool now contains a corrupted object and later test cases
> may get this corrupted object and crash.
>
> This patch saves the real content of the object and restores it after
> completing the test. The only use of the coroutine pool between those
> two points is the deletion of co2. As this only means an insertion at
> the head of an SLIST (release_pool or alloc_pool), it doesn't access the
> invalid list pointers that co1 has during this period.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> tests/test-coroutine.c | 7 +++++++
> 1 file changed, 7 insertions(+)
It's a really invasive test that has given us trouble before, but it
does test something useful...
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature