all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Rich Felker <dalias@libc.org>
Cc: emacs-devel@gnu.org
Subject: Re: Dumper issue, revisited; invalid realloc/free
Date: Thu, 05 Feb 2015 05:42:17 +0200	[thread overview]
Message-ID: <83d25pf2hy.fsf@gnu.org> (raw)
In-Reply-To: <20150204221704.GD23507@brightrain.aerifal.cx>

> Date: Wed, 4 Feb 2015 17:17:04 -0500
> From: Rich Felker <dalias@libc.org>
> Cc: emacs-devel@gnu.org
> 
> On Wed, Feb 04, 2015 at 10:40:15PM +0200, Eli Zaretskii wrote:
> > > Date: Wed, 4 Feb 2015 15:08:42 -0500
> > > From: Rich Felker <dalias@libc.org>
> > > Cc: emacs-devel@gnu.org
> > > 
> > > Upon checking master, w32heap.c is not using the system malloc. It's
> > > its own implementation of the malloc API written on top of the Win32
> > > HeapAlloc API.
> > 
> > System malloc on Windows is a thin wrapper around HeapAlloc, so we are
> > actually using system malloc.  There are good reasons why we call
> > HeapAlloc directly, but they are immaterial for the purposes of this
> > discussion.
> 
> Yes, but from my standpoint it's conceptually very different -- as
> written, it's depending on interposing its own definition of malloc
> and would not work, for example, on a windows runtime that uses a
> malloc not based on HeapAlloc.

How is it different?  You could make malloc a function pointer, and
point it to one implementation at dump time, and to another after
dumping.

The main point here, and the one I thought was important for you, is
that gmalloc is not used, i.e. the code does not depend on the
internals of the malloc implementation.  This condition is satisfied
by using HeapAlloc.



      reply	other threads:[~2015-02-05  3:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 17:57 Dumper issue, revisited; invalid realloc/free Rich Felker
2015-02-04 19:08 ` Eli Zaretskii
2015-02-04 19:13   ` Rich Felker
2015-02-04 19:22     ` Eli Zaretskii
2015-02-04 19:26     ` Eli Zaretskii
2015-02-04 20:34       ` Ken Brown
2015-02-05  1:31         ` Rich Felker
2015-02-05  3:25           ` Rich Felker
2015-02-05  3:48             ` Eli Zaretskii
2015-02-05  4:33               ` Rich Felker
2015-02-05 16:14                 ` Wolfgang Jenkner
2015-02-05 18:43                   ` Rich Felker
2015-02-04 19:21 ` Eli Zaretskii
2015-02-04 19:37   ` Rich Felker
2015-02-04 19:44     ` Eli Zaretskii
2015-02-04 19:49       ` Rich Felker
2015-02-04 19:54         ` Eli Zaretskii
2015-02-04 20:02           ` Rich Felker
2015-02-04 20:36             ` Eli Zaretskii
2015-02-04 20:08       ` Rich Felker
2015-02-04 20:40         ` Eli Zaretskii
2015-02-04 22:17           ` Rich Felker
2015-02-05  3:42             ` Eli Zaretskii [this message]

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=83d25pf2hy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dalias@libc.org \
    --cc=emacs-devel@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.