From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime Date: Wed, 10 Aug 2011 21:10:36 +0300 Message-ID: <83k4alxhlv.fsf@gnu.org> References: <4E41940C.2010605@cornell.edu> <83zkjhxnty.fsf@gnu.org> <4E42C567.2000303@cornell.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1312999923 17642 80.91.229.12 (10 Aug 2011 18:12:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2011 18:12:03 +0000 (UTC) Cc: 9273@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 10 20:11:59 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QrDG3-0008IN-7K for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Aug 2011 20:11:59 +0200 Original-Received: from localhost ([::1]:46889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrDG2-0002zq-Ho for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Aug 2011 14:11:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrDFw-0002pf-P0 for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2011 14:11:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrDFs-0004V8-QV for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2011 14:11:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrDFs-0004V4-L1 for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2011 14:11:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QrDH4-00029u-8E; Wed, 10 Aug 2011 14:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Aug 2011 18:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9273 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9273-submit@debbugs.gnu.org id=B9273.13129999348238 (code B ref 9273); Wed, 10 Aug 2011 18:13:02 +0000 Original-Received: (at 9273) by debbugs.gnu.org; 10 Aug 2011 18:12:14 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QrDGH-00028o-9g for submit@debbugs.gnu.org; Wed, 10 Aug 2011 14:12:14 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QrDGE-00028g-OC for 9273@debbugs.gnu.org; Wed, 10 Aug 2011 14:12:11 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LPQ00C0053GQF00@a-mtaout20.012.net.il> for 9273@debbugs.gnu.org; Wed, 10 Aug 2011 21:10:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.94.185]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LPQ00ALV55L7F91@a-mtaout20.012.net.il>; Wed, 10 Aug 2011 21:10:34 +0300 (IDT) In-reply-to: <4E42C567.2000303@cornell.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 10 Aug 2011 14:13:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49991 Archived-At: > Date: Wed, 10 Aug 2011 13:52:39 -0400 > From: Ken Brown > CC: "9273@debbugs.gnu.org" <9273@debbugs.gnu.org> > > On 8/10/2011 11:56 AM, Eli Zaretskii wrote: > >> Date: Tue, 09 Aug 2011 16:09:48 -0400 > >> From: Ken Brown > > > >> But when the dumped emacs is run, it uses Cygwin's sbrk, which > >> allocates memory on a heap that won't (as of Cygwin 1.7.10) be > >> contiguous with the static heap. The saved value of _heapbase, > >> which points into the static heap, is never changed, but it will > >> mess up later calculations as soon as sbrk is called for the first > >> time. > > > > Are you sure this is all that's at work here? AFAIR, gmalloc does > > have code to cope with non-contiguous memory regions returned by sbrk. > > The issue isn't that sbrk returns non-contiguous regions. The issue is > that two different of sbrk are used. One is used when temacs is > running, and a different one is used when the dumped emacs.exe is > running. I still don't see the problem: the memory sbrk'ed before dumping is frozen in the dumped Emacs, so I don't see how that could matter. Perhaps I'm missing something.