From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: The emacs_backtrace "feature" Date: Sat, 29 Sep 2012 22:31:27 +0300 Organization: JURTA Message-ID: <874nmglvp4.fsf@mail.jurta.org> References: <83lig3yaci.fsf@gnu.org> <505CC1FA.4070300@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1348948037 14292 80.91.229.3 (29 Sep 2012 19:47:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2012 19:47:17 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 29 21:47:22 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 1TI30T-0001sf-Be for ged-emacs-devel@m.gmane.org; Sat, 29 Sep 2012 21:47:21 +0200 Original-Received: from localhost ([::1]:41516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TI30N-0001i7-SH for ged-emacs-devel@m.gmane.org; Sat, 29 Sep 2012 15:47:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TI30K-0001bY-VQ for emacs-devel@gnu.org; Sat, 29 Sep 2012 15:47:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TI30K-0004cq-3J for emacs-devel@gnu.org; Sat, 29 Sep 2012 15:47:12 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:33412 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TI30I-0004cP-L7; Sat, 29 Sep 2012 15:47:10 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 314EA451CCA1; Sat, 29 Sep 2012 12:47:09 -0700 (PDT) In-Reply-To: <505CC1FA.4070300@cs.ucla.edu> (Paul Eggert's message of "Fri, 21 Sep 2012 12:37:30 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 69.163.218.105 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:153716 Archived-At: >> . Many calls to emacs_backtrace in the current sources limit the >> number of backtrace frames to 10, but that is an arbitrary >> limitation which will be too small in most, if not all, situations. > > We can change that number if needed. 10 was enough for my use > cases. Of course no number will be ideal in all cases. Still, 10 > is almost invariably better than 0. 10 is too small number. I tried to visit an .ico file, and Emacs crashed in the ImageMagick library. I found the backtrace in ~/.xsession-errors: Backtrace: /usr/local/src/emacs/trunk/src/emacs[0x4f1bdb] /usr/local/src/emacs/trunk/src/emacs[0x4d70dd] /usr/local/src/emacs/trunk/src/emacs[0x4f1b4e] /usr/local/src/emacs/trunk/src/emacs[0x4f28c3] /lib/libpthread.so.0(+0xfb40)[0x7fa162357b40] /lib/libc.so.6(gsignal+0x35)[0x7fa16136eba5] /lib/libc.so.6(abort+0x180)[0x7fa1613726b0] /lib/libc.so.6(__assert_fail+0xf1)[0x7fa161367a71] /usr/lib/libMagickCore.so.3(DestroyLinkedList+0xea)[0x7fa1628939ba] /usr/lib/libMagickCore.so.3(DestroyExceptionInfo+0x52)[0x7fa16287bdc2] /usr/lib/libMagickWand.so.3(DestroyPixelWand+0x5b)[0x7fa162cee84b] ... Running it through `addr2line' helps to see source-code lines of crash-processing functions: emacs_backtrace at /usr/local/src/emacs/trunk/src/sysdep.c:2034 terminate_due_to_signal at /usr/local/src/emacs/trunk/src/emacs.c:314 handle_fatal_signal at /usr/local/src/emacs/trunk/src/sysdep.c:1552 deliver_thread_signal at /usr/local/src/emacs/trunk/src/sysdep.c:1537 (inlined by) deliver_fatal_thread_signal at /usr/local/src/emacs/trunk/src/sysdep.c:1564 But the most interesting part of the backtrace with information about Emacs image functions is truncated. Displaying more lines might help to understand whether the bug is caused by the old version of ImageMagick or by a bug in src/image.c. Would be better to increase the number of lines to 24 or 32 or any other round number.