From owner-freebsd-current@freebsd.org Sun Dec 4 00:04:20 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDCACC658C2 for ; Sun, 4 Dec 2016 00:04:20 +0000 (UTC) (envelope-from 01000158c7252f0c-6c3198b0-fbef-4a60-ade9-e3b91d9e83bd-000000@amazonses.com) Received: from a8-56.smtp-out.amazonses.com (a8-56.smtp-out.amazonses.com [54.240.8.56]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86E24191 for ; Sun, 4 Dec 2016 00:04:20 +0000 (UTC) (envelope-from 01000158c7252f0c-6c3198b0-fbef-4a60-ade9-e3b91d9e83bd-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1480809852; h=To:From:Subject:Message-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=NwYAZLdO+eYgAw4CRdcE6E10lOzvgaPeHozxoT0QaUM=; b=XkyXxbeFczUpj1sueUEdbLfvJk/iy6+jVTdMbMz+8wt899Me2IskF4oArEDKPhBq CN/U93iOwuAjYmhuYcmac66OTs58/JJ92mtGqAE3ffg1OInMOfyQuZQ/BwrLtbvaXdI 6yai4vqvYJBChqv8Gzrj/oNHzCzdY3IcHG3rUOEA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1480809852; h=To:From:Subject:Message-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=NwYAZLdO+eYgAw4CRdcE6E10lOzvgaPeHozxoT0QaUM=; b=yfkFps+v/GUPMP4X9o9nGv8R/I9VmZezBJECCxOhTebD9fLUrkmeSFmVnVyvha2i OpXrZ3x2bfXmzNiJzaQzbDzR5/KejC4R+eNjNFdlY9Oyk52vbjQptsG5NjuwjwGrzqJ yva3HJ8Qh7WxjiAsm1IQHc7IbaSC2FPyWNwG16wc= To: freebsd-current@freebsd.org From: Colin Percival Subject: clang/llvm 3.9.0 mysteriously zeroing variables? Message-ID: <01000158c7252f0c-6c3198b0-fbef-4a60-ade9-e3b91d9e83bd-000000@email.amazonses.com> Date: Sun, 4 Dec 2016 00:04:12 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.12.04-54.240.8.56 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-Mailman-Approved-At: Sun, 04 Dec 2016 04:09:57 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2016 00:04:20 -0000 Starting with r309124 (when clang/llvm 3.9.0 was imported) I'm seeing EC2 instances panic on boot with a division-by-zero error; the code in question is in blkfront.c, printing out the size of disks: > device_printf(dev, "%juMB <%s> at %s", > (uintmax_t) sectors / (1048576 / sector_size), > device_get_desc(dev), > xenbus_get_node(dev)); My first thought was that 'sector_size' must be either zero or very large... but no, when I add printf("sector_size = %ju\n", (uintmax_t)sector_size), it's entirely normal. What's more, adding that printf makes the division-by-zero panic go away. I'd think I was just hallucinating, but earlier today I heard that a similarly "impossible" panic had been observed in the NFS client code when compiled with clang/llvm 3.9.0. So... is anyone else seeing unexpected panics or other odd behaviour starting after clang/llvm 3.9.0 was imported? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid