From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: SEGV in x_catch_errors_unwind (x86_64-unknown-linux-gnu) Date: Mon, 27 Feb 2006 19:51:20 -0500 Message-ID: <87vev0uwzb.fsf@stupidchicken.com> References: <17403.34595.452779.27043@segfault.lan> <17408.2816.556166.916490@segfault.lan> <87zmkfv51z.fsf@stupidchicken.com> <87vev3v4bi.fsf@stupidchicken.com> <17408.38984.512531.681620@segfault.lan> <87accfxbiw.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1141459794 11666 80.91.229.2 (4 Mar 2006 08:09:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2006 08:09:54 +0000 (UTC) Cc: emacs-devel@gnu.org, jwe@bevo.che.wisc.edu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 04 09:09:52 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FFRpj-0002iJ-QB for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2006 09:09:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFRpm-00015F-DG for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2006 03:09:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FFRTs-0004Sr-AH for emacs-devel@gnu.org; Sat, 04 Mar 2006 02:47:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FFRTn-0004PP-Kk for emacs-devel@gnu.org; Sat, 04 Mar 2006 02:47:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FEAlo-00078k-JI for emacs-devel@gnu.org; Tue, 28 Feb 2006 14:44:28 -0500 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FDtGV-0007Sd-4X; Mon, 27 Feb 2006 20:02:59 -0500 Original-Received: from [18.19.6.82] (helo=localhost.localdomain) by mx20.gnu.org with esmtp (Exim 4.52) id 1FDt3G-00067g-A6; Mon, 27 Feb 2006 19:49:18 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 19C58120920; Mon, 27 Feb 2006 19:51:20 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 27 Feb 2006 03:58:57 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51134 Archived-At: Richard Stallman writes: > I just checked in some changes to make the x error handler avoid using > record_unwind_protect. I am unable to make Emacs crash now -- can you > confirm this? > > But if it does not use record_unwind_protect, how does it ensure > that the x error handler gets turned off if an error happens? > Have you checked every use of x_catch_errors to make sure that no > Lisp errors can occur before the matching call to x_uncatch_errors? I missed two places in xselect.c where code protected in x_catch_errors can signal Lisp errors (x_reply_selection_request and x_get_foreign_selection), in corner cases. Since these two functions cannot be called from a signal handler, I'll put their x_uncatch_errors call into a record_unwind_protect. I have checked several more times, and there is no other such occurence---most uses of x_catch_errors just wrap one or two Xlib calls.