From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: allocate_string_data memory corruption Date: Wed, 18 Jan 2006 15:48:33 -0500 Message-ID: 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 1137624093 23919 80.91.229.2 (18 Jan 2006 22:41:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2006 22:41:33 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 18 23:41:25 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 1EzLzT-0001hs-3j for ged-emacs-devel@m.gmane.org; Wed, 18 Jan 2006 23:41:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzM1s-0005aI-Bf for ged-emacs-devel@m.gmane.org; Wed, 18 Jan 2006 17:43:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzKGr-0008UL-HF for emacs-devel@gnu.org; Wed, 18 Jan 2006 15:51:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzKGq-0008Tq-IH for emacs-devel@gnu.org; Wed, 18 Jan 2006 15:51:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzKGp-0008TS-9h for emacs-devel@gnu.org; Wed, 18 Jan 2006 15:51:07 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EzKKk-0003J4-78 for emacs-devel@gnu.org; Wed, 18 Jan 2006 15:55:10 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 41B1B2CE9B6; Wed, 18 Jan 2006 15:48:37 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 85C8E4AC00A; Wed, 18 Jan 2006 15:48:33 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 7174EE6C19; Wed, 18 Jan 2006 15:48:33 -0500 (EST) Original-To: Chong Yidong In-Reply-To: <87vewha2zl.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 18 Jan 2006 11:57:02 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.855, requis 5, autolearn=not spam, AWL 0.04, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:49240 Archived-At: > In this function, data->string is set to s, and nbytes is set to > nbytes. If check_sblock is a no-op, there should be no change. > However, we get an abort on the second debugging check: Most likely the thing that's happening is that check_sblock takes a "long" time during which there's a higher probability for a signal to arrive and the bug itself is that one of the signal handlers does some string allocation (or some other manipulation of those data structures). I'd try something like eassert (!in_allocate_string_data); in_allocate_string_data = 1; ... check_sblock(); ... in_allocate_string_data = 0; BTW, it's possible that -DSYNC_INPUT fixes the bug. Stefan