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 20:15:52 -0500 Message-ID: <87d5ipm338.fsf-monnier+emacs@gnu.org> References: <87vewha2zl.fsf@stupidchicken.com> <871wz5f66t.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 1137635600 29014 80.91.229.2 (19 Jan 2006 01:53:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2006 01:53:20 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 19 02:53:13 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 1EzOz2-0006HS-AA for ged-emacs-devel@m.gmane.org; Thu, 19 Jan 2006 02:53:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzP1R-0001oS-NY for ged-emacs-devel@m.gmane.org; Wed, 18 Jan 2006 20:55:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EzORa-0006Lh-AW for emacs-devel@gnu.org; Wed, 18 Jan 2006 20:18:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EzORV-0006Ir-Cn for emacs-devel@gnu.org; Wed, 18 Jan 2006 20:18:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EzORU-0006HM-0U for emacs-devel@gnu.org; Wed, 18 Jan 2006 20:18:24 -0500 Original-Received: from [209.226.175.188] (helo=tomts25-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EzOVQ-00066p-61; Wed, 18 Jan 2006 20:22:28 -0500 Original-Received: from alfajor ([67.71.26.73]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060119011552.UOCR25777.tomts25-srv.bellnexxia.net@alfajor>; Wed, 18 Jan 2006 20:15:52 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 116E6D7377; Wed, 18 Jan 2006 20:15:52 -0500 (EST) Original-To: Chong Yidong In-Reply-To: <871wz5f66t.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 18 Jan 2006 18:48:58 -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:49251 Archived-At: >> Are you in fact 110% sure the abort happens on the second debugging >> check? Can you tell how did you verify this? (The line number shown >> by GDB is not a reliable evidence.) >> >> Was this code compiled without optimizations? If not, recompile with >> "-O0" and see if you get abort or crash in another place. > I'll double-check with the user, but I believe it was compiled with > -O0. We had to move the check around in that function while we were > narrowing down where the memory corruption occurs, and the line number > reported by GDB seemed to be correct. If you use eassert instead of "if (...) abort();" you won't have to worry about it because the line number is embedded in the error message, so you don't even need debug-symbols. OTOH you need to compile with -DENABLE_CHECKING. Stefan