all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Emacs-diffs Digest, Vol 19, Issue 62
Date: 24 Jun 2004 10:50:51 +0200	[thread overview]
Message-ID: <m3acyt8hlg.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <m3llid8k5n.fsf@kfs-l.imdomain.dk>

storm@cua.dk (Kim F. Storm) writes:

> Richard Stallman <rms@gnu.org> writes:
> 
> > Why is this necessary?
> 
> I don't know ... anybody else have a clue?

Actually, thinking more about this, I now realize that the GCPROs are
indeed not needed in the non-MARK_STACK case.

If they were needed, they had to be added around the calls to mapcar1,
but mapcar1 already does the necessary GCPRO of the (partial) args
array.

Since the GCPROs does nothing in the MARK_STACK case, that
also why my "dogc" change DTRT for MARK_STACK-based GC.

I'll remove the GCPROs.

> 
> The reason I added it is that I had SEVERE problems with emacs
> misbehaving or crashing with the initial version of this patch.
> 
> One "misbehaviour" was that reading mail with Gnus suddenly would
> signal not-a-list errors when going from one message to another.  I
> guess that Gnus uses quite large lists to keep track of the messages I
> have read -- and convert that information to/from text, so I would
> guess it uses mapconcat or mapcar in that process, and thus triggers
> the new code...
> 
> I then added the "dogc" stuff to the Lisp_Save_Value so that GC scans
> the allocated memory.  (I'm on GNU/Linux which uses the MARK_STACK GC
> method).
> 
> After adding the GC awareness, those crashes went away, so I thought I
> better add GCPROs for the non-MARK_STACK case as well.
> 
> But you are right that it looks superfluous ... 
> 
> > 
> >     diff -c emacs/src/fns.c:1.367 emacs/src/fns.c:1.368
> >     *** emacs/src/fns.c:1.367	Tue Jun 22 13:57:00 2004
> >     --- emacs/src/fns.c	Tue Jun 22 14:48:10 2004
> >     ***************
> >     *** 3020,3026 ****
> >     --- 3020,3030 ----
> > 	for (i = 1; i < nargs; i += 2)
> > 	  args[i] = separator;
> > 
> >     +   GCPRO1 (*args);
> >     +   gcpro1.nvars = nargs;
> > 	ret = Fconcat (nargs, args);
> >     +   UNGCPRO;
> >     + 
> > 	SAFE_FREE_LISP (nargs);
> > 
> > As far as I know, Feval can't be called from Fconcat, so GC
> > cannot occur there.
> > 
> >     +   GCPRO1 (*args);
> >     +   gcpro1.nvars = leni;
> > 	ret = Flist (leni, args);
> >     +   UNGCPRO;
> >     + 
> > 
> > Same issue there.
> > 
> > 

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2004-06-24  8:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1BcnjN-0005AC-0I@monty-python.gnu.org>
     [not found] ` <E1BdKWZ-0004NI-3s@fencepost.gnu.org>
2004-06-24  7:55   ` Emacs-diffs Digest, Vol 19, Issue 62 Kim F. Storm
2004-06-24  8:50     ` Kim F. Storm [this message]
2004-06-30 12:09       ` Andreas Schwab
2004-07-06 23:50         ` Andreas Schwab
2004-07-12  9:34           ` Kim F. Storm
2004-07-12 10:06             ` Andreas Schwab
2004-07-12 11:13               ` Kim F. Storm
2004-07-12 11:39                 ` Andreas Schwab
2004-07-12 13:12                   ` Kim F. Storm
2004-07-12 13:25                     ` Andreas Schwab
2004-07-12 13:13                   ` Kim F. Storm
2004-07-12 13:26                     ` Andreas Schwab
2004-07-12 14:23                       ` Kim F. Storm
2004-06-25  6:28     ` Richard Stallman

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=m3acyt8hlg.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --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.