From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.devel Subject: Re: crash on MacOSX Date: Sat, 18 Aug 2012 21:40:21 -0400 Message-ID: References: <83fw7kh1te.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1345340435 5694 80.91.229.3 (19 Aug 2012 01:40:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2012 01:40:35 +0000 (UTC) Cc: Eli Zaretskii , cyd@gnu.org, emacs-devel@gnu.org To: Liang Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 03:40:31 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T2uVC-00006X-UT for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2012 03:40:31 +0200 Original-Received: from localhost ([::1]:36098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2uVB-0001Ps-EQ for ged-emacs-devel@m.gmane.org; Sat, 18 Aug 2012 21:40:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2uV8-0001Pn-Oy for emacs-devel@gnu.org; Sat, 18 Aug 2012 21:40:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2uV7-0005YU-S8 for emacs-devel@gnu.org; Sat, 18 Aug 2012 21:40:26 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:50756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2uV5-0005YA-9N; Sat, 18 Aug 2012 21:40:23 -0400 Original-Received: by obhx4 with SMTP id x4so8719339obh.0 for ; Sat, 18 Aug 2012 18:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sAS+z1GQ9gndd0ni/wb/wevDa9Wqui5AHolnKcchMSM=; b=PX2hS9+4YUHoimvJ/4C4IbFnPNxbHTgUUt351DTX1IZSjo9zq6btB+fdrCj01x9qV7 PyCKse1/Rak95Y6fuEI9uyH553Sj87THAFuGUKz1PvQ2TU2Yql7kpo+Od1oANo8Cn6sa KRE88n2XUgsoiw6PsMKLKEsZcBeYmr5cj9z4LoHk1idb69mJXns1H4akGX3kUqBU8VHO 1cjVFlJThjoT3UYp7UWPjDFUkyI3WQeGBIYtMW/qtBlRcTZDPW41+BSyid+R7aij6Gnw XUn8aUFUlTcwwsRrlzoLou94yhKg/he7s4w3aDngFoRDMwMPRraXTlrQeItRwc9jswYh 0/xw== Original-Received: by 10.50.171.100 with SMTP id at4mr6056505igc.47.1345340421546; Sat, 18 Aug 2012 18:40:21 -0700 (PDT) Original-Received: by 10.64.106.199 with HTTP; Sat, 18 Aug 2012 18:40:21 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152652 Archived-At: > This bug is not always reproducible when I debug it inside gdb. [...] > There are two ways to work around this bug. One is to revert r109641 [...] > I'm not sure if it is related to this patch directly. Since, the > other way is to compile nsfont.m with -g3 -O0. [..] > I tried ./configure --with-ns CC=clang LD=clang. And then I don't see > this problem. It could be a compiler bug. One problem with r109641 that *might* explain your observations is that it introduced code that initialized a static string using a char array that wasn't null terminated. This would result in the string's containing an unexpected number of extra characters (possibly non-ascii, as well), but the number and identity of the unexpected chars would vary between emacs instances. Compiling with -g3 -O0, however, leads to the same extra chars appearing in the string across different invocations of emacs, and when compiling with Clang the string has only the expected characters. This might not explain the exception you're seeing (there are likely other issues with 109641; e.g., the #ifdef NS_IMPL_COCOA portion of ns_ascii_average_width is, I'm fairly sure, incorrect, but I haven't sorted out yet what the correct thing for it to do is). But please try building 109677 and see if that fixes the problem for you.