From owner-freebsd-stable@FreeBSD.ORG  Wed Sep 19 18:13:51 2012
Return-Path: <owner-freebsd-stable@FreeBSD.ORG>
Delivered-To: freebsd-stable@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B54AF106566B;
	Wed, 19 Sep 2012 18:13:51 +0000 (UTC)
	(envelope-from gpalmer@freebsd.org)
Received: from noop.in-addr.com (mail.in-addr.com [IPv6:2001:470:8:162::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F4228FC12;
	Wed, 19 Sep 2012 18:13:51 +0000 (UTC)
Received: from gjp by noop.in-addr.com with local (Exim 4.80 (FreeBSD))
	(envelope-from <gpalmer@freebsd.org>)
	id 1TEOmL-0002hN-TO; Wed, 19 Sep 2012 14:13:41 -0400
Date: Wed, 19 Sep 2012 14:13:41 -0400
From: Gary Palmer <gpalmer@freebsd.org>
To: Roland Smith <rsmith@xs4all.nl>
Message-ID: <20120919181341.GD77784@in-addr.com>
References: <CAPS9+SsCSsM2DPgdd=016yTf1tE6Y0d=7FV-h9NjXb_j3eET2Q@mail.gmail.com>
	<20120912060420.GE31029@lonesome.com>
	<20120917194317.GB43284@slackbox.erewhon.net>
	<50579DEC.3060902@FreeBSD.org>
	<20120919171250.GA50969@slackbox.erewhon.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20120919171250.GA50969@slackbox.erewhon.net>
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: gpalmer@freebsd.org
X-SA-Exim-Scanned: No (on noop.in-addr.com); SAEximRunCond expanded to false
Cc: Mark Linimon <linimon@lonesome.com>, Dimitry Andric <dim@FreeBSD.org>,
	Andreas Nilsson <andrnils@gmail.com>,
	FreeBSD Stable Mailing List <freebsd-stable@FreeBSD.org>
Subject: Re: Clang as default compiler
X-BeenThere: freebsd-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Production branch of FreeBSD source code <freebsd-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-stable>, 
	<mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable>
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
	<mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Sep 2012 18:13:51 -0000

On Wed, Sep 19, 2012 at 07:12:50PM +0200, Roland Smith wrote:
> On Tue, Sep 18, 2012 at 12:02:20AM +0200, Dimitry Andric wrote:
> > On 2012-09-17 21:43, Roland Smith wrote:
> > > On Wed, Sep 12, 2012 at 01:04:20AM -0500, Mark Linimon wrote:
> > ...
> > >> For most of the failures, we are already aware of them, as a result of
> > >> our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
> > >> really help us all that much.
> > >
> > > Those are build failures. What about crashes? E.g. I've recently had
> > > crashes with x11-wm/i3 and x11/rxvt-unicode. Both problems disappeared after
> > > recompiling them with gcc46.
> > 
> > We can't figure them all out without *your* help. :-)  Please attempt to
> > run the program in a debugger, gather core dumps, etc.  Or at least, try
> > to make it into a reproducible case, so somebody else can attempt to
> > diagnose it.  And please specify the exact version of clang you used.
> 
> I was using the clang that is in base in 9.0-RELEASE-p3:
> 
> FreeBSD clang version 3.0 (branches/release_30 142614) 20111021
> Target: x86_64-unknown-freebsd9.0
> Thread model: posix
> 
> I was thinking of installing the most recent clang-devel since it seemed to
> have a lot of improvements, but I was wondering what is the correct way of
> makeing sure that it is used in preference to the one in base? I thought about
> moving /usr/local/bin before /usr/bin in $PATH, but I'm not sure that is a
> good idea.
> 
> > Now, most of the time this is because programs contain bugs, or
> > undefined behavior, which happens to go unnoticed with gcc, for example
> > because it optimized by accident in such a way to mask the bug.  In a
> > few other cases, real clang bugs are found, and most of the time, those
> > can be fixed quickly.
> > 
> > That said, in these cases specifically, how do the applications crash?
> > Right at startup, or after specific inputs or user actions?
> 
> Rxvt-unicode seemed to crash reliably whenever I was scrolling through a
> document with less(1). If I reached the end of the document, and pressed Page
> Down (keysim Next), it would crash. It was quite weird. 
> 

That sounds like the bell was doing it.  If you do CTRL-G (or something
else that makes a beep) from the shell prompt in rxvt-unicode does it
also crash?

Regards,

Gary