From owner-svn-src-head@freebsd.org Fri Jul 24 19:10:22 2015 Return-Path: Delivered-To: svn-src-head@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 D9D5C9A97A3; Fri, 24 Jul 2015 19:10:22 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id B55B811E8; Fri, 24 Jul 2015 19:10:22 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.10] (unknown [192.168.1.10]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 73E069424; Fri, 24 Jul 2015 19:10:16 +0000 (UTC) Subject: Re: svn commit: r285803 - head/bin/ls To: Antoine Brodin References: <201507221958.t6MJwLEk015409@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: <55B28D93.5090003@freebsd.org> Date: Fri, 24 Jul 2015 15:10:11 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 24 Jul 2015 19:10:23 -0000 On 2015-07-24 13:58, Antoine Brodin wrote: > On Wed, Jul 22, 2015 at 9:58 PM, Allan Jude wrote: >> Author: allanjude (doc committer) >> Date: Wed Jul 22 19:58:21 2015 >> New Revision: 285803 >> URL: https://svnweb.freebsd.org/changeset/base/285803 >> >> Log: >> Remove an excess space accidently introduced in the output in ls(1) by r285734 >> >> Spotted by: dim >> Approved by: eadler (mentor) >> Sponsored by: ScaleEngine Inc. >> Differential Revision: https://reviews.freebsd.org/D3152 >> >> Modified: >> head/bin/ls/print.c > > Hi, > > Some recent (less than 5 days old) changes on ls(1) broke it on i386, > and more than 8000 ports are affected by this. > > See for instance > http://beefy3.nyi.freebsd.org/data/head-i386-default/p392703_s285807/logs/errors/autoconf-2.69.log > > From the log: > %%% > gmake[3]: Entering directory > '/wrkdirs/usr/ports/devel/autoconf/work/autoconf-2.69/doc' > Segmentation fault (core dumped) > ../build-aux/mdate-sh: failed parsing 'ls -L -l -d -n /' output > Updating ./version.texi > %%% > It used to build fine with r285732 and doesn't work anymore at r285807. > > Cheers, > > Antoine > > >> >> Modified: head/bin/ls/print.c >> ============================================================================== >> --- head/bin/ls/print.c Wed Jul 22 19:55:32 2015 (r285802) >> +++ head/bin/ls/print.c Wed Jul 22 19:58:21 2015 (r285803) >> @@ -456,7 +456,7 @@ printtime(const char *field, time_t ftim >> snprintf(fmt, sizeof(fmt), "{d:%s/%%hs} ", field); >> xo_attr("value", "%ld", (long) ftime); >> xo_emit(fmt, longstring); >> - snprintf(fmt, sizeof(fmt), "{en:%s/%%ld} ", field); >> + snprintf(fmt, sizeof(fmt), "{en:%s/%%ld}", field); >> xo_emit(fmt, (long) ftime); >> } >> >> The r285734 change didn't explicitly cast some references to uid_t, resulting in a segfault on i386. Clang generated a warning about this immediately while I was debugging when I duplicated the xo_emit command as a printf. Can we teach our clang that xo_emit is printf, and so the same formatting type matching should be checked? That would be very helpful. I have posted a review for the fix: https://reviews.freebsd.org/D3191 -- Allan Jude