From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Emacs-diffs Digest, Vol 19, Issue 62 Date: 24 Jun 2004 10:50:51 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088067057 22989 80.91.224.253 (24 Jun 2004 08:50:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Jun 2004 08:50:57 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jun 24 10:50:51 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BdPwZ-0005Y2-00 for ; Thu, 24 Jun 2004 10:50:51 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BdPwY-0004Ge-00 for ; Thu, 24 Jun 2004 10:50:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BdPxx-0006OM-Kd for emacs-devel@quimby.gnus.org; Thu, 24 Jun 2004 04:52:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BdPxn-0006OC-4w for emacs-devel@gnu.org; Thu, 24 Jun 2004 04:52:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BdPxj-0006Ng-G9 for emacs-devel@gnu.org; Thu, 24 Jun 2004 04:52:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BdPxi-0006NX-Py for emacs-devel@gnu.org; Thu, 24 Jun 2004 04:52:03 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1BdPwF-0005BS-UD for emacs-devel@gnu.org; Thu, 24 Jun 2004 04:50:32 -0400 Original-Received: (qmail 7623 invoked from network); 24 Jun 2004 08:50:30 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 24 Jun 2004 08:50:30 -0000 Original-To: rms@gnu.org In-Reply-To: Original-Lines: 72 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25221 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25221 storm@cua.dk (Kim F. Storm) writes: > Richard Stallman 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 http://www.cua.dk