🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98586

gcpro missing in describe-bindings

#98586
From: Bruno Verlyck
Date: Tue, 30 Apr 1991 17:57
37 lines
1662 bytes
If emacs garbage-collects while executing describe-bindings, there's a good
chance that it ends in something like:
 wrong type argument: listp, <number>

I've tried the following patch in describe_map_tree.  Things seem better (but
it could be that other gcpro's are still needed).  One should also remove the
`register' for maps, as its address is taken (but gcc only gives a warning,
so..)

diff -c -r1.1 /usr/local/gnu/emacs/src/keymap.c
*** 1.1	1991/04/30 16:11:48
--- /usr/local/gnu/emacs/src/keymap.c	1991/04/30 16:14:48
***************
*** 908,915 ****
--- 908,917 ----
       int partial;
  {
    register Lisp_Object maps, elt, sh;
+   struct gcpro gcpro1;
  
    maps = Faccessible_keymaps (startmap);
+   GCPRO1 (maps);
  
    for (; !NULL (maps); maps = Fcdr (maps))
      {
***************
*** 929,934 ****
--- 931,937 ----
        if (NULL (sh) || !NULL (Fkeymapp (sh)))
  	describe_map (Fcdr (elt), Fcar (elt), partial, sh);
      }
+   UNGCPRO;
  }
  
  describe_command (definition)

Bruno.
Technical Details
Message-ID: <9104301757.AA06337@future.gipsi.fr>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,3923ff43e724e9b,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-04-30 10:57:17 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!unreplyable!garbage
From: bruno@FUTURE.GIPSI.FR (Bruno Verlyck)
Newsgroups: gnu.emacs.bug
Subject: gcpro missing in describe-bindings
Message-ID: <9104301757.AA06337@future.gipsi.fr>
Date: 30 Apr 91 17:57:17 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: bruno@gipsi.gipsi.fr
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 37
Approved: bug-gnu-emacs@prep.ai.mit.edu