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: YAMAMOTO Mitsuharu
Subject: Re: Crash during access_keymap
Date: Wed, 16 Nov 2005 13:32:48 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Tue, 15 Nov 2005 18:21:59 -0500, "Richard M. Stallman" 
>>>>> <address@hidden> said:

>> I meant a kind of analysis to ensure that any literals inside a
>> function are not modified.

> I don't quite follow.  If they are pure, they cannot be modified;
> the primitives that would do so will signal an error.  Unless they
> have bugs.

I'm not suggesting anything.  You say compile-time check is
unnecessary.  I say it is difficult.  No problem.

> On a system where "pure" space really is read-only, trying to modify
> it would cause an immediate crash--good for debugging, but not an
> elegant way to report the problem.

I guess there are many places that don't do CHECK_IMPURE, and setting
watchpoint is as useful for debugging as the read-only pure space.
Actually, I found another problem related to
international/encode-kb.el using it.  This causes a real problem
unlike the Fccl_execute_on_string case.

(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'?).  But it is
modified in the following part.

(defun encoded-kbd-setup-keymap (coding)
  ;; At first, reset the keymap.
  (define-key encoded-kbd-mode-map "\e" nil)
  ;; Then setup the keymap according to the keyboard coding system.

`define-key' does not do CHECK_IMPURE for the given keymap, and the
following situation really occurs.

>>>>> On Sun, 13 Nov 2005 15:39:37 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

>   So, if there's a non-pure object that is only pointed to by pure
> objects, which may happen if the assumption for the pure storage is
> violated, then the object is reachable but get collected.

Now I'm sure this is the real cause of "Wrong type argument: commandp"
error that is found in some Carbon Emacs distributions that preloads
international/encoded-kb.elc.
        
                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

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