From owner-svn-src-all@freebsd.org Sat Feb 10 19:42:14 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 D816FF17F53; Sat, 10 Feb 2018 19:42:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) (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 98D746E643; Sat, 10 Feb 2018 19:42:13 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f173.google.com with SMTP id p188so13343422ioe.12; Sat, 10 Feb 2018 11:42:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Hlcr5AqjqT1O1hY2Hzck6O2mvwZIilpnczPHjPqtniI=; b=CLWxH3/0mne9d3NisYeo9ynIKdl4GBFuhQrsdN+0S0e0DDswC+dq19LqeB9I97jDyv Sm4c40KB0mzYKS/41M/YVcuaXBfus+jtsuUJX/nHMXqlLZf0UumXNmtM8aVY1mOrItPw fK/mKKeXidb6MaY7GjeKvCzlZ6NumBYlJLc1kAIsie4JMuGakIlhNMot1OvOnmND8wo8 IPFdbAXarPTCqDqxTb6yLY7QosCZAVrLoMcODJinCkcVmkYOkf69Okvnd/YWMH8zN4m2 ryu2jwdfcNfQdV8hW0CpMM7HHDNzXMIFWhmxaOjVvvXZZcVEx2UJWuE8/C/Nf6291VAg 9YPQ== X-Gm-Message-State: APf1xPDJC0P+1PnKCKZNTOXJ0KGQ3Ms/rgRjpeU0X8+cEsDcBkR/9ZMu Y9i/UdnKyl7Yt3iK22STuHW4vZ0/ X-Google-Smtp-Source: AH8x2252YrLoh3eM74yFQdDEsm4RxbF927YpghKqM1HDZ+m1n0yD/OQxpVZw56JHrTeQbyzpotTTWQ== X-Received: by 10.107.4.133 with SMTP id 127mr7688333ioe.209.1518290478015; Sat, 10 Feb 2018 11:21:18 -0800 (PST) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com. [209.85.223.175]) by smtp.gmail.com with ESMTPSA id n73sm6903856ioi.84.2018.02.10.11.21.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Feb 2018 11:21:17 -0800 (PST) Received: by mail-io0-f175.google.com with SMTP id k80so1960292ioe.13; Sat, 10 Feb 2018 11:21:17 -0800 (PST) X-Received: by 10.107.15.8 with SMTP id x8mr3039896ioi.38.1518290477520; Sat, 10 Feb 2018 11:21:17 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.152.123 with HTTP; Sat, 10 Feb 2018 11:21:17 -0800 (PST) In-Reply-To: References: <201802091946.w19Jkqb3038864@repo.freebsd.org> From: Conrad Meyer Date: Sat, 10 Feb 2018 11:21:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r329077 - head/usr.bin/tftp To: Pedro Giffuni Cc: Justin Hibbits , Ed Maste , 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.25 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: Sat, 10 Feb 2018 19:42:14 -0000 Nah, both sets of warnings are spurious. The first set is arguably not a compiler bug, just lack of omniscience. The variables are never actually used uninitialized in the !interactive case. The second set is pure bug. Justin found the workaround (same as before this change) and has applied it. Thanks, Justin. Best, Conrad On Sat, Feb 10, 2018 at 9:10 AM, Pedro Giffuni wrote: > > > On 02/10/18 11:13, Justin Hibbits wrote: >> >> On Fri, Feb 9, 2018 at 7:22 PM, Ed Maste wrote: >>> >>> On 9 February 2018 at 14:46, Conrad Meyer wrote: >>>> >>>> Author: cem >>>> Date: Fri Feb 9 19:46:51 2018 >>>> New Revision: 329077 >>>> URL: https://svnweb.freebsd.org/changeset/base/329077 >>>> >>>> Log: >>>> tftp(1): Fix libedit state corruption involving signals >>> >>> From https://ci.freebsd.org/job/FreeBSD-head-mips-build/391/console: >>> >>> 01:15:24 --- all_subdir_usr.bin/tftp --- >>> 01:15:24 --- main.o --- >>> 01:15:24 cc1: warnings being treated as errors >>> 01:15:24 /usr/src/usr.bin/tftp/main.c: In function 'main': >>> 01:15:24 /usr/src/usr.bin/tftp/main.c:182: warning: 'hist' may be used >>> uninitialized in this function >>> 01:15:24 /usr/src/usr.bin/tftp/main.c:181: warning: 'el' may be used >>> uninitialized in this function >>> >> After initializing these, I see the following interesting error: >> >> /home/chmeee/freebsd/head/usr.bin/tftp/main.c:181: warning: variable >> 'el' might be clobbered by 'longjmp' or 'vfork' >> /home/chmeee/freebsd/head/usr.bin/tftp/main.c:182: warning: variable >> 'hist' might be clobbered by 'longjmp' or 'vfork' >> >> This appears to be a known bug in gcc, at >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24239 so I don't know >> what the best way to fix it is. > > > Independent of the compiler bug, it does seem like 'el' and 'hist' can be > used uninitialized for the non-interactive case. > > Untested, but perhaps an only-when-needed initialization like this may > workaround the compiler bug. > > Cheers, > > Pedro.