From: duqi Subject: Re: The segmentfault when using xl create domU Date: Wed, 16 Apr 2014 17:12:01 +0800 (CST) Message-ID: <3294f859.94.14569cea4d7.Coremail.duqi_2009@163.com> References: <25f20e60.4a87.145633bba97.Coremail.duqi_2009@163.com> <1397552021.24638.13.camel@kazak.uk.xensource.com> <78496d24.5d.14564c71cc0.Coremail.duqi_2009@163.com> <534D3E54.9060008@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <534D3E54.9060008@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall , "xen-devel@lists.xen.org" Cc: Wei Huang , Ian Campbell , "Stefano Stabellini (Xen mainlister)" , =?GBK?B?uazP/sD7?= , hdegoede , "bjzhang@suse.com" List-Id: xen-devel@lists.xenproject.org It's a compiler bug. For some reasons gcc doesn't generate the right assembly when -O1 is specified on the command line. Which version of gcc do you use(4.7.*?)? Which distribution are you using? Can you also call disas the crash and copy the output? Gcc 4.8 doesn't seem to be affected. Hello, Thank you very much for your answer! I replace the gcc 4.7.2 with the gcc 4.8.1 and everything works. On the other hand, when I used gcc 4.7.2, I have made the below changes like here: diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 730f6e1..7c8a5cc 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -668,7 +668,8 @@ libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm_out) GC_INIT(ctx); libxl_vminfo *ptr = NULL; int idx, i, ret; - xc_domaininfo_t info[1024]; + //xc_domaininfo_t info[1024]; + xc_domaininfo_t info[16]; ret = xc_domain_getinfolist(ctx->xch, 1, ARRAY_SIZE(info), info); if (ret < 0) { As a result , it also works. I'm not sure if this is useful to you . Many thanks again. duqi.