From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v9 1/4] libxl/libxc: Move libxl_get_cpu_topology()'s hypercall buffer management to libxc Date: Wed, 13 May 2015 11:56:44 -0400 Message-ID: <5553743C.1080007@oracle.com> References: <1431361890-3466-1-git-send-email-boris.ostrovsky@oracle.com> <1431361890-3466-2-git-send-email-boris.ostrovsky@oracle.com> <20150513154645.GA27391@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150513154645.GA27391@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering , ian.campbell@citrix.com Cc: wei.liu2@citrix.com, xen-devel@lists.xen.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 05/13/2015 11:46 AM, Olaf Hering wrote: > On Mon, May 11, Boris Ostrovsky wrote: > >> xc_cputopoinfo() is not expected to be used on a hot path and therefore >> hypercall buffer management can be pushed into libxc. This will simplify >> life for callers. > This got just merged and cause a compile error. Looks like gcc is right, if > xc_cputopoinfo fails the pointer will be uninitialized. > > gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall > -Wstrict-prototypes -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD > -MF .xenpm.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O1 -Werror > -I/work/xen/xengit/xen-staging/tools/misc/../../tools > -I/work/xen/xengit/xen-staging/tools/misc/../../tools/libxc/include > -I/work/xen/xengit/xen-staging/tools/misc/../../tools/include > -I/work/xen/xengit/xen-staging/tools/misc/../../tools/include > -I/work/xen/xengit/xen-staging/tools/misc/../../tools/xenstore/include > -I/work/xen/xengit/xen-staging/tools/misc/../../tools/include -c -o > xenpm.o xenpm.c > cc1: warnings being treated as errors > xenpm.c: In function 'cpu_topology_func': > xenpm.c:963:19: error: 'cputopo' may be used uninitialized in this function > xenpm.c: In function 'signal_int_handler': > xenpm.c:358:19: error: 'cputopo' may be used uninitialized in this function > gmake[3]: *** [xenpm.o] Error 1 Right. I build debug version and it adds -O0 which apparently doesn't warn on this error. Ian, do you want me to resubmit the series or send a fix for this? -boris