Received: from eggs.gnu.org ([2001:4830:134:3::10]:42248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cER-00038B-7Q for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:20:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9cEN-0007qd-U8 for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:20:47 -0500 Received: from indium.canonical.com ([91.189.90.7]:52795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cEN-0007qO-Ni for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:20:43 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1a9cEM-0001kv-VE for ; Thu, 17 Dec 2015 17:20:42 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D51592E80C3 for ; Thu, 17 Dec 2015 17:20:42 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 17 Dec 2015 17:12:50 -0000 From: Octoploid <1527322@bugs.launchpad.net> Sender: bounces@canonical.com References: <20151217163255.25580.65309.malonedeb@soybean.canonical.com> Message-Id: <20151217171251.25998.18791.launchpad@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1527322] Re: sefault in thread-pool.c:246:5: Reply-To: Bug 1527322 <1527322@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Summary changed: - undefined behavior issues + sefault in thread-pool.c:246:5: ** Summary changed: - sefault in thread-pool.c:246:5: + segfault in thread-pool.c:246:5: -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1527322 Title: segfault in thread-pool.c:246:5: Status in QEMU: New Bug description: Building qemu-2.5.0 with -fsanitize=3Dundefined shows, e.g.: markus@x4 linux % qemu-system-x86_64 -s -enable-kvm -net nic,vlan=3D0,mod= el=3Dvirtio -net user -fsdev local,security_model=3Dnone,id=3Droot,path=3D/= -device virtio-9p-pci,id=3Droot,fsdev =3Droot,mount_tag=3D/dev/root -m 512 -smp 2 -kernel /usr/src/linux/arch/x= 86/boot/bzImage -nographic -append "init=3D/bin/zsh root=3D/dev/root consol= e=3DttyS0 kgdboc=3DttyS0 rootflags=3Drw, trans=3Dvirtio rootfstype=3D9p ip=3Ddhcp earlyprintk=3DttyS0" /var/tmp/portage/app-emulation/qemu-2.5.0/work/qemu-2.5.0/exec.c:307:5: r= untime error: variable length array bound evaluates to non-positive value 0 /var/tmp/portage/app-emulation/qemu-2.5.0/work/qemu-2.5.0/hw/i386/kvm/api= c.c:37:47: runtime error: left shift of 15 by 28 places cannot be represent= ed in type 'int' /var/tmp/portage/app-emulation/qemu-2.5.0/work/qemu-2.5.0/include/qemu/rc= u.h:85:21: runtime error: member access within null pointer of type 'struct= rcu_reader_data' /var/tmp/portage/app-emulation/qemu-2.5.0/work/qemu-2.5.0/include/qemu/rc= u.h:101:5: runtime error: member access within null pointer of type 'struct= rcu_reader_data' /var/tmp/portage/app-emulation/qemu-2.5.0/work/qemu-2.5.0/include/qemu/rc= u.h:102:8: runtime error: member access within null pointer of type 'struct= rcu_reader_data' ... ALSA device list: No soundcards found. /var/tmp/portage/app-emulation/qemu-2.5.0/work/qemu-2.5.0/thread-pool.c:2= 46:5: runtime error: member access within null pointer of type 'struct Thre= adPool' [1] 9295 segmentation fault qemu-system-x86_64 -s -enable-kvm -net ni= c,vlan=3D0,model=3Dvirtio -net user = As you can see it segfaults when build with upcoming gcc-6, that is more = aggressive when it comes to undefined behavior. The compiler just assumes that "this" can never be NULL and optimizes acc= ordingly. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1527322/+subscriptions