all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "9273@debbugs.gnu.org" <9273@debbugs.gnu.org>
Subject: bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime
Date: Thu, 11 Aug 2011 17:45:41 -0400	[thread overview]
Message-ID: <4E444D85.4090907@cornell.edu> (raw)
In-Reply-To: <83zkjhxnty.fsf@gnu.org>

On 8/10/2011 11:56 AM, Eli Zaretskii wrote:
>> Date: Tue, 09 Aug 2011 16:09:48 -0400
>> From: Ken Brown<kbrown@cornell.edu>
>> I made one naive attempt to do this, but it didn't work (and it was
>> Cygwin specific).  Namely, I made unexec (for Cygwin) set
>> _malloc_initialized = 0 before dumping.  The resulting emacs aborted
>> as soon as it was started.  I haven't figured out what went wrong,
>> but I'm not sure that's the right answer anyway.

The problem was that realloc got called on memory that had been 
allocated prior to dumping, and the malloc information that was used 
then had disappeared.  I think there's an obvious solution to this.  At 
the time of reinitialization, we save the previous malloc state.  Then 
if realloc is called on a pointer to something in the static heap, we 
temporarily restore the old state and let realloc proceed as it did in 
temacs prior to dumping.

Unless I've (again) missed something obvious, it shouldn't be too hard
to do this.  I'm about to go on vacation, but I should have a patch 
ready within a couple weeks.

Ken







  parent reply	other threads:[~2011-08-11 21:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 20:09 bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime Ken Brown
2011-08-10  0:24 ` Richard Stallman
2011-08-10 15:56 ` Eli Zaretskii
2011-08-10 17:52   ` Ken Brown
2011-08-10 18:10     ` Eli Zaretskii
2011-08-10 18:49       ` Ken Brown
2011-08-11 21:45   ` Ken Brown [this message]
2011-08-12  6:54     ` Eli Zaretskii
2011-08-12 10:10       ` Ken Brown
2011-08-12 11:33         ` Eli Zaretskii
2011-08-12 12:18           ` Ken Brown
2011-08-12 20:24             ` Ken Brown
2011-08-13  8:05               ` Eli Zaretskii
2011-08-13 13:48                 ` Ken Brown
2011-08-13 14:41                   ` Eli Zaretskii
2011-08-13 14:53                     ` Ken Brown
2011-08-13 15:07                       ` Stefan Monnier
2011-08-13 15:33                         ` Ken Brown
2011-08-13 19:19                           ` Stefan Monnier
2011-08-14  3:13                             ` Ken Brown
2011-08-16 13:30                               ` Ken Brown
2011-08-12 23:51 ` grischka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E444D85.4090907@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=9273@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.