From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Piet van Oostrum Newsgroups: gmane.emacs.devel Subject: Possible memory corruption problem Date: Mon, 06 Feb 2006 16:36:01 +0100 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139244066 15693 80.91.229.2 (6 Feb 2006 16:41:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2006 16:41:06 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 17:41:00 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 1F69L8-0000EU-M0 for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2006 17:35:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F69OR-0002rQ-KS for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2006 11:39:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F68Sy-0004tt-RF for emacs-devel@gnu.org; Mon, 06 Feb 2006 10:39:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F68So-0004pf-2e for emacs-devel@gnu.org; Mon, 06 Feb 2006 10:39:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F68Sn-0004pU-Od for emacs-devel@gnu.org; Mon, 06 Feb 2006 10:39:37 -0500 Original-Received: from [131.211.80.10] (helo=mail.cs.uu.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F68SM-0005Oh-2M for emacs-devel@gnu.org; Mon, 06 Feb 2006 10:39:10 -0500 Original-Received: from mail.cs.uu.nl (localhost.localdomain [127.0.0.1]) by mail.cs.uu.nl (Postfix) with ESMTP id 2E135A35FD for ; Mon, 6 Feb 2006 16:36:06 +0100 (CET) Original-Received: from ordesa.cs.uu.nl (ordesa.cs.uu.nl [131.211.81.146]) by mail.cs.uu.nl (Postfix) with ESMTP id 233AFA35EE for ; Mon, 6 Feb 2006 16:36:06 +0100 (CET) Original-Received: by ordesa.cs.uu.nl (Postfix, from userid -2) id DB7BA2D9AE3; Mon, 6 Feb 2006 16:36:04 +0100 (CET) Original-Received: from ordesa.cs.uu.nl (localhost [127.0.0.1]) by ordesa.cs.uu.nl (Postfix) with ESMTP id 30A382D9ACA for ; Mon, 6 Feb 2006 16:36:03 +0100 (CET) X-Mailer: emacs 22.0.50.2 (via feedmail 8 I) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) X-AV-Checked: ClamAV using ClamSMTP at cs.uu.nl 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:50106 Archived-At: I have had a few occasions when my mailboxes got corrupted. I read my normal email with VM, and mail from mailing lists with gnus. I have CVS emacs compiled about a month ago, running on Mac OS X 10.4.4. A few cases now, the last of which was last weekend, the mailboxes that I had open got completely mixed up. I lost my INBOX (primary VM mailbox) completely last night, and some of its messages where found in the middle of another mailbox that I had open. The mixup also occurred around last Christmas with VM and gnus mailboxes mixed up. Sometimes the corrupted mailboxes appeared to contain garbage text from other files. My mailboxes are usually the largest files that I have open in Emacs, a few MB each. I have tried to find the common circumstances when this happens and it aeems to me that it happens when the machine is low on virtual memory (including swap space). So I suspect that some part of Emacs' buffer and memory management fails to check the result of malloc calls or something similar. I have written a test program and it appears that Mac OS X's malloc and realloc correctly return NULL when the process runs out of memory. I am sorry I can't give any more details at the moment. However I can add that Emacs did not crash in the cases mentioned. -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: piet@vanoostrum.org