[gnu.emacs.bug] fatal error in funcall

raible@EW09.NAS.NASA.GOV (Eric L. Raible) (09/23/89)

In GNU Emacs 18.55.1 of Mon Aug 28 1989 on ew00 (silicon-graphics-unix)

(also in Vax 4.3 BSD)

Before manual-entry (an autoloaded function) is loaded,

(funcall (symbol-function 'manual-entry) "topic")

causes a segmentation violation.

jbw@bucsf.bu.edu (Joe Wells) (09/25/89)

In article <8909221825.AA10361@ew09.nas.nasa.gov> raible@EW09.NAS.NASA.GOV (Eric L. Raible) writes:

   In GNU Emacs 18.55.1 of Mon Aug 28 1989 on ew00 (silicon-graphics-unix)

   Before manual-entry (an autoloaded function) is loaded,
   (funcall (symbol-function 'manual-entry) "topic")
   causes a segmentation violation.

I am including a patch to fix this.  It appears to be the result of
executing this line of code when funname is not a symbol:

	   XSYMBOL (funname)->name->data);

These pieces of code also triggered the bug:

   (call-interactively '(autoload "simple"))
   (command-execute '(autoload "simple"))
   (funcall '(autoload "simple"))
   (eval '((autoload "simple")))

I haven't tried the patch myself, but it appears to be straightforward.

--
Joe Wells <jbw@bucsf.bu.edu>
jbw%bucsf.bu.edu@bu-it.bu.edu
...!harvard!bu-cs!bucsf!jbw
----------------------------------------------------------------------
*** /usr14/gnu/dist-18.55/src/eval.c	Mon Sep  4 03:46:20 1989
--- eval.c	Sun Sep 24 16:15:58 1989
***************
*** 1227,1232 ****
--- 1227,1235 ----
    int count = specpdl_ptr - specpdl;
    Lisp_Object fun, val;
  
+   if (XTYPE (funname) != Lisp_Symbol)
+     error ("Attempting to autoload non-symbol");
+   
    fun = funname;
  
    /* Value saved here is to be restored into Vautoload_queue */