Received: from eggs.gnu.org ([2001:4830:134:3::10]:48838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X01oS-0007Xp-38 for qemu-devel@nongnu.org; Thu, 26 Jun 2014 01:01:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X01oM-0006MI-Mx for qemu-devel@nongnu.org; Thu, 26 Jun 2014 01:01:32 -0400 Received: from soto.provo.novell.com ([137.65.250.214]:52434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X01oM-0006MC-FJ for qemu-devel@nongnu.org; Thu, 26 Jun 2014 01:01:26 -0400 Message-Id: <53AC199D020000660003F56A@soto.provo.novell.com> Date: Wed, 25 Jun 2014 23:01:17 -0600 From: "Chun Yan Liu" References: <1401960072-2363-1-git-send-email-cyliu@suse.com> <53A8347C.6010709@dlhnet.de> In-Reply-To: <53A8347C.6010709@dlhnet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH v28 00/33] replace QEMUOptionParameter with QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: Kevin Wolf , stefanha@redhat.com >>> On 6/23/2014 at 10:06 PM, in message <53A8347C.6010709@dlhnet.de>, = Peter Lieven wrote:=20 > On 05.06.2014 11:20, Chunyan Liu wrote:=20 > > This patch series is to replace QEMUOptionParameter with QemuOpts, so = that =20 > only=20 > > one Qemu Option structure is kept in QEMU code.=20 > >=20 > > ---=20 > > Changes to v27:=20 > > * rebase to git master (code has been updated in this part since = v27 =20 > sent=20 > > so rebase to make the patch series work.)=20 > >=20 > > All patches are also available from:=20 > > https://github.com/chunyanliu/qemu/commits/QemuOpts=20 > >=20 > >=20 > > Chunyan Liu (33):=20 > > QemuOpts: move find_desc_by_name ahead for later calling=20 > > QemuOpts: repurpose qemu_opts_print to replace=20 > > print_option_parameters=20 > > QemuOpts: add def_value_str to QemuOptDesc=20 > > qapi: output def_value_str when query command line options=20 > > QemuOpts: change opt->name|str from (const char *) to (char *)=20 > > QemuOpts: move qemu_opt_del ahead for later calling=20 > > QemuOpts: add qemu_opt_get_*_del functions for replace work=20 > > QemuOpts: add qemu_opts_print_help to replace print_option_help=20 > > QemuOpts: add conversion between QEMUOptionParameter to QemuOpts=20 > > QemuOpts: add qemu_opts_append to replace append_option_parameters= =20 > > QemuOpts: check NULL input for qemu_opts_del=20 > > change block layer to support both QemuOpts and QEMUOptionParamter= =20 > > vvfat.c: handle cross_driver's create_options and create_opts=20 > > cow.c: replace QEMUOptionParameter with QemuOpts=20 > > gluster.c: replace QEMUOptionParameter with QemuOpts=20 > > iscsi.c: replace QEMUOptionParameter with QemuOpts=20 > > nfs.c: replace QEMUOptionParameter with QemuOpts=20 > > qcow.c: replace QEMUOptionParameter with QemuOpts=20 > > QemuOpts: export qemu_opt_find=20 > > qcow2.c: replace QEMUOptionParameter with QemuOpts=20 > > qed.c: replace QEMUOptionParameter with QemuOpts=20 > > raw-posix.c: replace QEMUOptionParameter with QemuOpts=20 > > raw-win32.c: replace QEMUOptionParameter with QemuOpts=20 > > raw_bsd.c: replace QEMUOptionParameter with QemuOpts=20 > > rbd.c: replace QEMUOptionParameter with QemuOpts=20 > > sheepdog.c: replace QEMUOptionParameter with QemuOpts=20 > > ssh.c: replace QEMUOptionParameter with QemuOpts=20 > > vdi.c: replace QEMUOptionParameter with QemuOpts=20 > > vhdx.c: replace QEMUOptionParameter with QemuOpts=20 > > vmdk.c: replace QEMUOptionParameter with QemuOpts=20 > > vpc.c: replace QEMUOptionParameter with QemuOpts=20 > > cleanup QEMUOptionParameter=20 > > QemuOpts: cleanup tmp 'allocated' member from QemuOptsList=20 > >=20 > > block.c | 99 ++++----=20 > > block/cow.c | 52 ++--=20 > > block/gluster.c | 73 +++---=20 > > block/iscsi.c | 32 ++-=20 > > block/nfs.c | 10 +-=20 > > block/qcow.c | 72 +++---=20 > > block/qcow2.c | 259 ++++++++++----------=20 > > block/qed.c | 112 +++++----=20 > > block/qed.h | 3 +-=20 > > block/raw-posix.c | 55 ++---=20 > > block/raw-win32.c | 38 +--=20 > > block/raw_bsd.c | 25 +-=20 > > block/rbd.c | 61 +++--=20 > > block/sheepdog.c | 105 ++++----=20 > > block/ssh.c | 30 ++-=20 > > block/vdi.c | 71 +++---=20 > > block/vhdx.c | 97 ++++----=20 > > block/vhdx.h | 1 +=20 > > block/vmdk.c | 121 +++++-----=20 > > block/vpc.c | 60 ++---=20 > > block/vvfat.c | 14 +-=20 > > include/block/block.h | 7 +-=20 > > include/block/block_int.h | 9 +-=20 > > include/qemu/option.h | 53 +---=20 > > include/qemu/option_int.h | 4 +-=20 > > qapi-schema.json | 5 +-=20 > > qapi/opts-visitor.c | 10 +-=20 > > qemu-img.c | 91 ++++---=20 > > qmp-commands.hx | 2 +=20 > > tests/qemu-iotests/049.out | 2 +-=20 > > tests/qemu-iotests/061.out | 2 +-=20 > > util/qemu-config.c | 4 +=20 > > util/qemu-option.c | 590 ++++++++++++++++++++----------------= ---------=20 > > 33 files changed, 1037 insertions(+), 1132 deletions(-)=20 > >=20 > =20 > It seems that for qemu-img this series introduces stack corruption. Any = =20 > ideas?=20 > =20 > lieven@lieven-pc:~/git/qemu$ valgrind --leak-check=3Dfull ./qemu-img = convert -p =20 > nfs://172.21.200.61/vcore-dev-cdrom/pool3/VC_Ubuntu_LTS_12.04.2_64bit.qco= w2 =20 > /tmp/x.raw=20 > =3D=3D23086=3D=3D Memcheck, a memory error detector=20 > =3D=3D23086=3D=3D Copyright (C) 2002-2011, and GNU GPL'd, by Julian = Seward et al.=20 > =3D=3D23086=3D=3D Using Valgrind-3.7.0 and LibVEX; rerun with -h for = copyright info=20 > =3D=3D23086=3D=3D Command: ./qemu-img convert -p =20 > nfs://172.21.200.61/vcore-dev-cdrom/pool3/VC_Ubuntu_LTS_12.04.2_64bit.qco= w2 =20 > /tmp/x.raw=20 > =3D=3D23086=3D=3D=20 > =3D=3D23086=3D=3D Warning: client switching stacks? SP change: = 0x7650f08 --> =20 > 0x7feffe9f0=20 > =3D=3D23086=3D=3D to suppress, use: --max-stackframe=3D342188920= 08 or greater=20 > =3D=3D23086=3D=3D Invalid write of size 8=20 > =3D=3D23086=3D=3D at 0x1C4980: qemu_opts_create (qemu-option.c:692)=20= > =3D=3D23086=3D=3D by 0x119918: img_convert (qemu-img.c:1385)=20 > =3D=3D23086=3D=3D by 0x11CEEC: main (qemu-img.c:2830)=20 > =3D=3D23086=3D=3D Address 0x7c65fe8 is 24 bytes inside a block of size = 104 free'd=20 > =3D=3D23086=3D=3D at 0x4C2B7B2: realloc (in =20 > /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)=20 > =3D=3D23086=3D=3D by 0x54C1AF6: g_realloc (in =20 > /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)=20 > =3D=3D23086=3D=3D by 0x1C5C52: qemu_opts_append (qemu-option.c:1129)= =20 > =3D=3D23086=3D=3D by 0x1198EE: img_convert (qemu-img.c:1383)=20 > =3D=3D23086=3D=3D by 0x11CEEC: main (qemu-img.c:2830)=20 > =3D=3D23086=3D=3D=20 > =20 > =20 > Peter=20 > =20 Thanks for reporting. I think it's the same issue and please refer to: http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg06013.html > =20