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: allocate_string_data memory corruption Date: Fri, 20 Jan 2006 09:49:42 -0500 Message-ID: <87d5in9cop.fsf@stupidchicken.com> References: <87vewha2zl.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 1137787212 23549 80.91.229.2 (20 Jan 2006 20:00:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 20:00:12 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 20 21:00:10 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 1F02QT-0008B9-LK for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2006 21:00:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F02KI-0001Bw-Az for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2006 14:53:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzxyV-0007Ge-NV for emacs-devel@gnu.org; Fri, 20 Jan 2006 10:14:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ezxka-0004LF-W6 for emacs-devel@gnu.org; Fri, 20 Jan 2006 10:00:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ezxcb-0001er-Nn for emacs-devel@gnu.org; Fri, 20 Jan 2006 09:52:17 -0500 Original-Received: from [18.95.6.18] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ezxgo-0002Pw-VQ; Fri, 20 Jan 2006 09:56:35 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id CC2521E42CD; Fri, 20 Jan 2006 09:49:42 -0500 (EST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu, 19 Jan 2006 22:56:09 -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:49327 Archived-At: Stefan Monnier writes: >> I just noticed that allocate_string does nothing to prevent >> signals from being handled. Neither does Fcons. The result >> >> So it seems that these functions need BLOCK_INPUT. > > I think instead they should be disallowed in signal handlers. > And AFAIK they are disallowed. But it's quite possible that some signal > handler does it, even though it's disallowed. Why, is there any disadvantage to using BLOCK_INPUT in allocate_string and Fcons? It seems like a more robust solution than checking individual signal handlers to make sure they behave properly.