From owner-freebsd-hackers@FreeBSD.ORG Fri May 16 04:49:55 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD5196C6 for ; Fri, 16 May 2014 04:49:55 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90CC12680 for ; Fri, 16 May 2014 04:49:55 +0000 (UTC) Received: by mail-ig0-f179.google.com with SMTP id hn18so334246igb.12 for ; Thu, 15 May 2014 21:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition; bh=N8RKewn/uLyfbx3u7oINOvXpSHKQWpv4ZWjhYE56IhA=; b=X9nqBvyxsYXjiI0Fjekg7DKBHpvwW11zE3Wg6z7NZOPhZnBXsNrrvi3CPolehDbaIC hQBf8IUaiFaqUQny40gvg1xvEOjcw/wuex56QUW20SFmLNDftIHELvaMVig9DZ7TE3rn HxE1S8ZaIvpdCmlHOmKdaRVXGYJBo2d7LpVaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition; bh=N8RKewn/uLyfbx3u7oINOvXpSHKQWpv4ZWjhYE56IhA=; b=CXNpFp6WtHcQDobELQtyhstZ5sjAYGuEia5mrUyzmOi3g7kcG9HQoA1HtIOmHGLrTb cPlMYnndZa4j5kqHKqrSnjTuIAdZi9nwueO3Bh7pepxJh7+0hMuUurT/oaNfL3Nk2JTJ 2KnWMA/Au+DCmt4zVbZ6bJqL0MMjxOdzCpf2Clbdf4smyAwRikJr/YS5SWkoZogYKKVs wIxdqTRdEcwNd+Fb1u5YweWOUAY2XvraVKVf5moCI2EK4SQhjzY1M9dDn0hYwqZmnszK XOAbW4TY7iPwIOZhKiTabgbgqufUdNMmr1z8zUqUcWrVKxPhvnQx9HpHq3GvLccAkq+P SDig== X-Gm-Message-State: ALoCoQkuWNUNyeKZpPgeNCniadzmDauUDlj0/5oitcObflSi0jDdARz+Cezd3wraRcxzs95YnOp2 X-Received: by 10.50.66.174 with SMTP id g14mr48893273igt.44.1400215794952; Thu, 15 May 2014 21:49:54 -0700 (PDT) Received: from DataIX.local (75-128-101-59.dhcp.sgnw.mi.charter.com. [75.128.101.59]) by mx.google.com with ESMTPSA id i16sm1954397igf.11.2014.05.15.21.49.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 May 2014 21:49:53 -0700 (PDT) X-Google-Original-From: jhellenthal@DataIX.net Received: from DataIX.local (localhost [127.0.0.1]) by DataIX.local (8.14.8/8.14.8) with ESMTP id s4G4nqZH038228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 16 May 2014 00:49:52 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.local (8.14.8/8.14.8/Submit) id s4G4nooX038227 for hackers@freebsd.org; Fri, 16 May 2014 00:49:50 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Fri, 16 May 2014 00:49:50 -0400 From: jhellenthal@dataix.net To: hackers@freebsd.org Subject: stable/10 r266159 base clang 3.4 Assertion on nul \0 Message-ID: <20140516044950.GA37592@DataIX.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 04:49:55 -0000 All, On powerpc maybe others, I believe I am hitting a bug in clang34 that is part of base. After seearching around it has lead me to (llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp) line 973ish code block where I believe it never checks for the condition of no new line at end of file but I am unfamiliar with the code and could use someone to take a closer look when they have the time. This is the link that lead me there: (Says resolved so I believe that to be another issue) http://comments.gmane.org/gmane.comp.compilers.llvm.bugs/24021 This is the error I see repeated through compilation of different programs: clang -c -I. -I../Src -I../Src -I../Src/Zle -I. -I/usr/local/include -DLIBICONV_PLUG -I/usr/local/include -DHAVE_CONFIG_H -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing -o builtin.o builtin.c UNREACHABLE executed! Stack dump: 0. Program arguments: /usr/bin/clang -cc1 -triple powerpc-unknown-freebsd10.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name builtin.c -mrelocation-model static -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu ppc -coverage-file /export/usr/obj/export/usr/ports/shells/zsh/work/zsh-5.0.5/Src/builtin.o -resource-dir /usr/bin/../lib/clang/3.4 -D LIBICONV_PLUG -D HAVE_CONFIG_H -D LIBICONV_PLUG -I . -I ../Src -I ../Src -I ../Src/Zle -I . -I /usr/local/include -I /usr/local/include -O2 -fdebug-compilation-dir /export/usr/obj/export/usr/ports/shells/zsh/work/zsh-5.0.5/Src -ferror-limit 19 -fmessage-length 94 -mstackrealign -fno-signed-char -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o builtin.o -x c builtin.c 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'builtin.c'. 4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@bin_print' clang: error: unable to execute command: Abort trap clang: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 20140216 Target: powerpc-unknown-freebsd10.0 Thread model: posix And this is roughly the code block area: // Check that a token range does not highlight only whitespace. if (R.isTokenRange()) { // Pick the first non-whitespace column. while (StartColNo < map.getSourceLine().size() && (map.getSourceLine()[StartColNo] == ' ' || map.getSourceLine()[StartColNo] == '\t')) StartColNo = map.startOfNextColumn(StartColNo); // Pick the last non-whitespace column. if (EndColNo > map.getSourceLine().size()) EndColNo = map.getSourceLine().size(); while (EndColNo && (map.getSourceLine()[EndColNo-1] == ' ' || map.getSourceLine()[EndColNo-1] == '\t')) EndColNo = map.startOfPreviousColumn(EndColNo); // If the start/end passed each other, then we are trying to highlight a // range that just exists in whitespace, which must be some sort of other // bug. assert(StartColNo <= EndColNo && "Trying to highlight whitespace??"); } Thanks for the Feedback and your time. Patches to test greatly welcomed. -- - (2^(N-1)) JJH48-ARIN