From owner-svn-src-all@freebsd.org Fri Jun 8 14:27:45 2018 Return-Path: Delivered-To: svn-src-all@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 C259C101C0C6; Fri, 8 Jun 2018 14:27:44 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 366F2842D9; Fri, 8 Jun 2018 14:27:44 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id i83-v6so20372008lfh.5; Fri, 08 Jun 2018 07:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ulf/Nf/+DpudeLs7nYiWybt3BJROU+yiOp0Augpnx30=; b=uzLIMqPRB+rsuD5PG4mdzQTctU30+nEslYGpj8O7QmNVYUFPnNqouCS2gAj+XOnNX1 EABJQwnfDOkT7BZ39azr89o7n9p+n4piMVijw9eZbFF2EFRK7ZsrQvU8Lf5XIBDmpJEO /SZn/FPkA1d919GkqcrboD/4TJ1/HQB9KAJcQcuK+A+0Ys86EmzzPm50CtcS/MmoJtKd sdQqN5Nf+izO4V8aJZt1Gfc1wAXarFqIjp9TYFkDcZ13ix0jHwUtb/ElXfRzc5XvUDUT k7LzWVFNqWX9VPgFv8ctCHin1b8Ii29D229/pVyoFLZhjDZJGff0xkI+w1OrJ9tAeVrI U94w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ulf/Nf/+DpudeLs7nYiWybt3BJROU+yiOp0Augpnx30=; b=N8j0ZhLszWETaLo4oZQp3swk4xmMu2NcSc9wbmilJoGpxss+JPUDFlJMwGFtSOwsfc ftpdrp18KPRURz9ccYgYiNyQFfhRZvBb+BRfKbsgNYiH9q61fdnHf29bk+VdZeBXc76A bdcTrQaY1L4bZDHvKktSGZe+MY8/OEjM55b9QbMTol4ioipxXzZmKC0kU4MTdiAF3mlq iSbbaLrc7e2YUTnE6huppqA1fJ427SylyOVGMMNnwgRlTIv7lpQdcZE23I/PGSGeNOvh p0QJCmMpcU5mJRNypP/71w8m+9ppYgL1FQm7GQAmGxJ6T3RaVnsWuYpDQt+2Fpsji93x WIaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ulf/Nf/+DpudeLs7nYiWybt3BJROU+yiOp0Augpnx30=; b=CP/u0iXfQSJOH5zjR+ZG238RX1xMLh/wp2qFT4aTKcyvaqRqQaQyBso2tPdAMa+j6m yW5OvfJQfUkTFc0d8BSZOoobLJKdjY/4qyvayyL5ASqtRbk7goMnELZK1pdsDss6s8eq 55uEWIkMeZsysTY6kfU2a4wbx9noXTesY7wKBugtmivc3JJWw+jmrhz/pjw2tVpRozUb DoObesqQDv8bZcsTKNxaSswY6yWndQt3NfnbkyhGtDp5kw/yXtH3yYQTIzqerJyVkcq2 LYTDwwoAJ2maWiBWct2YZFeo/BrE1lTg1+1JceM4sQkYt4IVy/3CiY1dmoP6FKul7MtT GbRQ== X-Gm-Message-State: APt69E0HpqO1wPFMoeZ2wD2pqpVAVYM+PJal2On7D6V9xSBOVeSQx7iM z4ASsbx4tIQ4br7xRbs2F1jbvnWzGCcp07bdirA= X-Google-Smtp-Source: ADUXVKL225gKL5oXbH8EUzykywl8Cg6GF+R663w9HnKvquwWNCRybtOwdz6Q5OIe3qQHqwkdg5L9X18zleNSs9lpiS0= X-Received: by 2002:a19:51db:: with SMTP id g88-v6mr4334931lfl.78.1528468062383; Fri, 08 Jun 2018 07:27:42 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 2002:a2e:1702:0:0:0:0:0 with HTTP; Fri, 8 Jun 2018 07:27:41 -0700 (PDT) In-Reply-To: References: <201806072049.w57Kn1Mk057119@repo.freebsd.org> From: Justin Hibbits Date: Fri, 8 Jun 2018 10:27:41 -0400 X-Google-Sender-Auth: akZwVjKgQ8MWWrGPF3T-wYCL9rU Message-ID: Subject: Re: svn commit: r334814 - head/sbin/dump To: Ed Maste Cc: Kirk McKusick , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 14:27:45 -0000 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. - Justin