From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K.V" Subject: Re: [PATCH -V2] tools/kvm/9p: Add encode/decode routines for protocol data Date: Mon, 27 Jun 2011 15:58:03 +0530 Message-ID: <87hb7bpo0c.fsf@linux.vnet.ibm.com> References: <1309154715-7555-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87mxh3pqge.fsf@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: levinsasha928@gmail.com, kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from e33.co.us.ibm.com ([32.97.110.151]:40686 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757517Ab1F0K2N (ORCPT ); Mon, 27 Jun 2011 06:28:13 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e33.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p5RAKdQ4024070 for ; Mon, 27 Jun 2011 04:20:39 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p5RAS83m165016 for ; Mon, 27 Jun 2011 04:28:08 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p5R4ReZo002858 for ; Sun, 26 Jun 2011 22:27:40 -0600 In-Reply-To: <87mxh3pqge.fsf@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 27 Jun 2011 15:05:13 +0530, "Aneesh Kumar K.V" wrote: > On Mon, 27 Jun 2011 10:35:49 +0300 (EEST), Pekka Enberg wrote: > > This breaks 'make check': > > > > ./kvm run -d tests/boot/boot_test.iso -p "init=init" > > Error: unknown switch `d' > > > > usage: kvm run [] [] > > > > Basic options: > > -0, make: *** [check] Segmentation fault > > > > > > I am able to reproduce this on debian x86_64. A simple test as below > kvm run -sda will result in segfault. I am find the option array > corrupt. Not yet sure why the patch would make a difference. Here > is the gdb dump of the structure > > ====Not working dump==== > (gdb) p *(opts) > $5 = {type = OPTION_GROUP, short_name = 0, long_name = 0x0, value = 0x0, argh = 0x0, help = 0x40f2b0 "Basic options:", flags = 0, > callback = 0, defval = 38654705664} > (gdb) p *(opts+1) > $6 = {type = 99, short_name = 4256447, long_name = 0x61551800000000
, value = 0x0, > argh = 0x40f2c400000000
, help = 0x0, flags = 0, callback = 0, defval = 468151435276} > (gdb) > > > ==== Working dump ==== > (gdb) p *(opts) > $4 = {type = OPTION_GROUP, short_name = 0, long_name = 0x0, value = 0x0, argh = 0x0, help = 0x40e9b0 "Basic options:", flags = 0, > callback = 0, defval = 0} > (gdb) p *(opts+1) > $5 = {type = OPTION_INTEGER, short_name = 99, long_name = 0x40e9bf "cpus", value = 0x6151c8, argh = 0x0, help = 0x40e9c4 "Number of CPUs", > flags = 0, callback = 0, defval = 0} > (gdb) net/9p/9p.h had #pragma pack(1) Moved the include into .c files. that fixed the issue -aneesh