From owner-svn-src-head@freebsd.org Sat Jun 9 17:15:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 564F31011422; Sat, 9 Jun 2018 17:15:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6130A7980F; Sat, 9 Jun 2018 12:08:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (unknown [72.142.116.18]) by mail.baldwin.cx (Postfix) with ESMTPSA id C8E3810AFCD; Sat, 9 Jun 2018 08:08:13 -0400 (EDT) Subject: Re: svn commit: r334814 - head/sbin/dump To: Justin Hibbits , Ed Maste References: <201806072049.w57Kn1Mk057119@repo.freebsd.org> Cc: Kirk McKusick , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: <76ac237e-c62c-8439-e3ba-3164a8aa36eb@FreeBSD.org> Date: Sat, 9 Jun 2018 08:08:12 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Sat, 09 Jun 2018 08:08:14 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2018 17:15:44 -0000 On 6/8/18 10:27 AM, Justin Hibbits wrote: > On Fri, Jun 8, 2018 at 10:08 AM, Ed Maste wrote: >> On 7 June 2018 at 16:49, Kirk McKusick wrote: >>> Author: mckusick >>> Date: Thu Jun 7 20:49:01 2018 >>> New Revision: 334814 >>> URL: https://svnweb.freebsd.org/changeset/base/334814 >>> >>> Log: >>> Ensure proper initialization of superblock. >>> >> ... >>> --- head/sbin/dump/main.c Thu Jun 7 19:57:55 2018 (r334813) >>> +++ head/sbin/dump/main.c Thu Jun 7 20:49:01 2018 (r334814) >>> @@ -433,6 +433,7 @@ main(int argc, char *argv[]) >>> msgtail("to %s\n", tape); >>> >>> sync(); >>> + sblock = NULL; >>> if ((ret = sbget(diskfd, &sblock, -1)) != 0) { >> >> sblock is initialized to NULL at the beginning of ffs_sbget, so I'm >> not really sure what's happening here. >> > > Diane just found possibly the real cause of the problem. dump.h is > included by almost every .c file, but defines variables, doesn't just > declare them. I think the real solution would be to define them in > main.c, or somewhere else, and just declare them in dump.h. Or if > they're truly only needed on a per-file basis, not as globals, they > could be marked static so there is no chance of conflict, and they're > pre-initialized to 0. The linker "might" merge them into the common > section, or might not, resulting in bizarre conflicts like what she's > seeing. Though, I'm surprised we're not seeing a linker error or > warning anyway. Is this in fact fallout from lld vs ld.bfd then? -- John Baldwin