From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXldN-0007cT-VB for qemu-devel@nongnu.org; Thu, 11 Aug 2016 04:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXldN-0000bl-41 for qemu-devel@nongnu.org; Thu, 11 Aug 2016 04:46:37 -0400 Date: Thu, 11 Aug 2016 09:46:26 +0100 From: Stefan Hajnoczi Message-ID: <20160811084626.GA3932@stefanha-x1.localdomain> References: <1470827847-15983-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: <1470827847-15983-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] test-coroutine: Fix coroutine pool corruption List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Signed-off-by: Kevin Wolf > --- > 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 --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXrDtiAAoJEJykq7OBq3PIiwgIAKkWe3jeXbHLdXXlFYCY0Ync AJIgM4lXUZx0pVMgOPPKrUvhlLKjBEUf9UmaKzIAkibMmZKQhdRIhLNVbqhNr425 TM/L3GT5wA3wDxG6NUMqWmGrroOogddH00IgB5xyiaUUDZs4vwDh2zyQtUpKVEc6 uxmQQ5mOCPgk8AQgF2kIKPBD0+sAoOo9On13T5tFHA8YWz784VZsLKDvgM3twPiG e4wOy+ZPriNOkJG/szgwbIoP6hBwWlYXYivIwLJJ4NH512zRMpD1XbCmurOZoPXl LTU2Hq5er4I7wpV07QpOi3IEngTrD7WYeWVBAKZ0RmSUbdkM9ApyzMMH1H4ThcQ= =p4qQ -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ--