From owner-freebsd-current@FreeBSD.ORG Mon Sep 19 16:01:51 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAD1B1065673 for ; Mon, 19 Sep 2011 16:01:51 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 9DBDB8FC0A for ; Mon, 19 Sep 2011 16:01:51 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 471D57F383F; Mon, 19 Sep 2011 17:52:53 +0200 (CEST) Date: Mon, 19 Sep 2011 17:52:53 +0200 From: Roman Divacky To: Jason Harmening Message-ID: <20110919155253.GA35727@freebsd.org> References: <20110917062309.GA82256@freebsd.org> <20110917214448.GA87874@freebsd.org> <20110919154654.GA35232@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110919154654.GA35232@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: Crashes in world built w/ clang: FP registers? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2011 16:01:51 -0000 On Mon, Sep 19, 2011 at 05:46:54PM +0200, Roman Divacky wrote: > On Sun, Sep 18, 2011 at 11:05:55AM -0500, Jason Harmening wrote: > > > Can you try building just tcsh ? I wonder if -O0 makes any difference... > > > > > > in either case, can you give me preprocessed (clang -E) source that > > > exhibits this bug (check with objdump -d that the unaligned sse read > > > is there) and show me how to reproduce that... I'll try that here. > > > > > > > > > To be honest, I am not sure why others are not seeing this behaviour :( > > > > > > roman > > > > > > > Building w/ -O0 eliminated the crash in csh at least. In that case, > > tw_collect() isn't even using the SSE registers. > > I've attached the objdump output for csh for both the -O2 and -O0 > > cases, along w/ the preprocessor output for tw.parse.c. > > it doesnt build for me.. with tons of errors like > > pes ~$ clang tw.parse.cpp > In file included from ../../contrib/tcsh/tw.parse.c:1: > In file included from ../../contrib/tcsh/tw.parse.c:36: > In file included from ../../contrib/tcsh/sh.h:38: > /usr/include/stddef.h:57:19: error: cannot combine with previous 'type-name' > declaration specifier > typedef __wchar_t wchar_t; > ^ > > how did you get the preprocessed file? and/or how do you compile it? Nevermind... I managed to save the file as a .cpp file :) But I am not seeing any misaligned SSE reads/writes: pes ~$ clang -O2 -c tw.parse.c && objdump -d tw.parse.o | grep movaps 23: 0f 29 85 60 ff ff ff movaps %xmm0,0xffffffffffffff60(%rbp) 3f6: 0f 29 85 10 ff ff ff movaps %xmm0,0xffffffffffffff10(%rbp) 6b6: 0f 29 85 f0 fe ff ff movaps %xmm0,0xfffffffffffffef0(%rbp) 85b: 0f 29 45 c0 movaps %xmm0,0xffffffffffffffc0(%rbp) 867: 0f 29 45 a0 movaps %xmm0,0xffffffffffffffa0(%rbp) 873: 0f 29 45 80 movaps %xmm0,0xffffffffffffff80(%rbp) b37: 0f 29 85 d0 fe ff ff movaps %xmm0,0xfffffffffffffed0(%rbp) e2c: 0f 29 85 c0 fe ff ff movaps %xmm0,0xfffffffffffffec0(%rbp) e3e: 0f 29 85 a0 fe ff ff movaps %xmm0,0xfffffffffffffea0(%rbp) e50: 0f 29 85 80 fe ff ff movaps %xmm0,0xfffffffffffffe80(%rbp) 1a4b: 0f 29 45 c0 movaps %xmm0,0xffffffffffffffc0(%rbp) 21e3: 0f 29 45 d0 movaps %xmm0,0xffffffffffffffd0(%rbp) 2647: 0f 29 85 50 fe ff ff movaps %xmm0,0xfffffffffffffe50(%rbp) 2659: 0f 29 85 30 fe ff ff movaps %xmm0,0xfffffffffffffe30(%rbp) How exactly are you compiling it? roman