emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash during access_keymap


From: Richard M. Stallman
Subject: Re: Crash during access_keymap
Date: Wed, 16 Nov 2005 17:01:35 -0500

    (defconst encoded-kbd-mode-map (make-sparse-keymap)
      "Keymap for Encoded-kbd minor mode.")

    The keymap is allocated in the pure storage if this file is preloaded,
    because it is defined by `defconst' (should be `defvar'?).

That is definitely a bug.  Could you change that to a defvar?


Meanwhile, how about this fix in keymap.c?

diff -c /home/rms/emacs/src/keymap.c.\~22\~ /home/rms/emacs/src/keymap.c
*** /home/rms/emacs/src/keymap.c.~22~   Wed Nov  9 18:11:57 2005
--- /home/rms/emacs/src/keymap.c        Wed Nov 16 08:16:54 2005
***************
*** 389,394 ****
--- 389,395 ----
          if (EQ (XCDR (prev), parent))
            RETURN_UNGCPRO (parent);
  
+         CHECK_IMPURE (prev);
          XSETCDR (prev, parent);
          break;
        }
***************
*** 931,936 ****
--- 932,938 ----
          {
            if (EQ (idx, XCAR (elt)))
              {
+               CHECK_IMPURE (elt);
                XSETCDR (elt, def);
                return def;
              }
***************
*** 948,953 ****
--- 950,956 ----
    keymap_end:
      /* We have scanned the entire keymap, and not found a binding for
         IDX.  Let's add one.  */
+     CHECK_IMPURE (insertion_point);
      XSETCDR (insertion_point,
             Fcons (Fcons (idx, def), XCDR (insertion_point)));
    }

Diff finished.  Wed Nov 16 08:17:06 2005




reply via email to

[Prev in Thread] Current Thread [Next in Thread]