From owner-svn-src-all@freebsd.org Sat Feb 10 17:20:30 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 A54ACF0CDF0 for ; Sat, 10 Feb 2018 17:20:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic306-35.consmr.mail.ne1.yahoo.com (sonic306-35.consmr.mail.ne1.yahoo.com [66.163.189.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF590682A8 for ; Sat, 10 Feb 2018 17:20:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1518283222; bh=oMKjtLepHcqC8vc4B719YHHj3pVRaNhbUtknAFbgmCg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=mCcB/9VVWFN7nOz08VZhMQYe/YiEk7xhSOx9zlP8Ml1NPv0p7RmSpqYrUVa4DJG/TwMXPUATC6uPeY1rBRmAftiCS4NtTzfOW0ZuldvkyFYgaevFyV5ewwAqvpeWh4r5x3Mod2OG/7bFbf103Y6YoCYXSeId4ZRvkDejOSbIRme4mNFM0Rbhx+Fiip5UEluNgBWwJ2FQuURoTjc1JDzR7djTbbIRGUlpsavJiSBd3/KdhGVdCnO7RVdAXqlRmzPsi4MOysEDAc0l+HMsd5Bdin2VKp7IIRsQkCl5VRkm0nAJyjjATDO8KwlxFPI3hbtOFodm6al5rE7tzCjsa6kfUA== X-YMail-OSG: tN2pZSQVM1m2bC5l.6aDmYbW2FT2NaEsG7M06gjKGtCao6R.cbZH6w1C5HyYY5N F822zP3v_4BgaCypKDAZqJ3MkomGJZkaELYIKwgKiBjJoYFn1lYyCrwn_eyXIeC5od2I26yIKp87 IyMca6kssQF7JF2oAFHSQiKo1kjZh2Kfgkpj2ZVxtPe0bqPjFdlex8C8JBqxp5fTuVNxjAL4nOde .NwW6GKSl63vlEYl5vPVDd78sNsvcgU0U7MqutzFxi4_ieMz5gMyb9YQcKcq_6inTHpXB9pXbKGs E6GmYvDaJt2qmLvRqo6X2sdyFwMA2m5Qi9yzsfrY_OEk4Pz02dICWCmFVqu9YeGvpk2giiyS6DyA aIccKYoZA9hCNrG9F1SN9tYjxWnNWa7kFGg4lZcNheTdPthQ8z8v46X0AuRX1Mwgyx2xfrMWRtcC ODhHCuAiWpKbLbLq..LJZB1tNtSW.A6cDg_t6j41xah4DTLX2vD8b9u2m9raRj_Ks7N6WKLUuyJO T0JvPF9GWKA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sat, 10 Feb 2018 17:20:22 +0000 Received: from smtp235.mail.ne1.yahoo.com (EHLO [192.168.0.8]) ([10.218.253.206]) by smtp403.mail.ne1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 9883850e26d98faa04ee84187afca94c; Sat, 10 Feb 2018 17:10:14 +0000 (UTC) Subject: Re: svn commit: r329077 - head/usr.bin/tftp To: Justin Hibbits , Ed Maste Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201802091946.w19Jkqb3038864@repo.freebsd.org> From: Pedro Giffuni Message-ID: Date: Sat, 10 Feb 2018 12:10:11 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------C66CCBE0737B54B1E4A9245D" Content-Language: en-US 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 17:20:30 -0000 This is a multi-part message in MIME format. --------------C66CCBE0737B54B1E4A9245D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------C66CCBE0737B54B1E4A9245D Content-Type: text/x-patch; name="tftp-gcc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tftp-gcc.diff" Index: usr.bin/tftp/main.c =================================================================== --- usr.bin/tftp/main.c (revision 329104) +++ usr.bin/tftp/main.c (working copy) @@ -197,6 +197,9 @@ el_set(el, EL_PROMPT, command_prompt); el_set(el, EL_SIGNAL, 1); el_source(el, NULL); + } else { /* Quell GCC */ + el = NULL; + hist = NULL; } if (argc > 1) { --------------C66CCBE0737B54B1E4A9245D--