[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Crash when defining function named with a number
From: |
Matthew Mundell |
Subject: |
Crash when defining function named with a number |
Date: |
11 Jun 2004 22:44:52 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Evaluating (defun 2 () t) causes the crash traced below. Perhaps
Fdefun should check that NAME is a symbol, as in the following patch.
===================================================================
RCS file: /cvsroot/emacs/emacs/src/eval.c,v
retrieving revision 1.217
diff -u -r1.217 eval.c
--- src/eval.c 1 Jun 2004 23:21:55 -0000 1.217
+++ src/eval.c 11 Jun 2004 21:18:27 -0000
@@ -617,6 +617,7 @@
register Lisp_Object defn;
fn_name = Fcar (args);
+ CHECK_SYMBOL (fn_name);
defn = Fcons (Qlambda, Fcdr (args));
if (!NILP (Vpurify_flag))
defn = Fpurecopy (defn);
(gdb) r -Q
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/matt/src/emacs-clean.bak_exclude/src/emacs -Q
Program received signal SIGSEGV, Segmentation fault.
0x08187404 in Fdefun (args=140083573) at eval.c:623
623 if (CONSP (XSYMBOL (fn_name)->function)
(gdb) xbacktrace
"defun"
"eval"
"eval-last-sexp-1"
"eval-last-sexp"
"call-interactively"
(gdb) bt
#0 0x08187404 in Fdefun (args=140083573) at eval.c:623
#1 0x08189a3a in Feval (form=138229580) at eval.c:2025
#2 0x0818a3ef in Ffuncall (nargs=2, args=0xbfffef04) at eval.c:2726
#3 0x081b723e in Fbyte_code (bytestr=140685825, vector=1,
maxdepth=-1073746176) at bytecode.c:689
#4 0x0818a7dc in funcall_lambda (fun=137101844, nargs=1,
arg_vector=0xbffff044) at eval.c:2913
#5 0x0818a2cd in Ffuncall (nargs=2, args=0xbffff040) at eval.c:2783
#6 0x081b723e in Fbyte_code (bytestr=140685801, vector=1,
maxdepth=-1073745856) at bytecode.c:689
#7 0x0818a7dc in funcall_lambda (fun=137102628, nargs=1,
arg_vector=0xbffff1b4) at eval.c:2913
#8 0x0818a2cd in Ffuncall (nargs=2, args=0xbffff1b0) at eval.c:2783
#9 0x08185c14 in Fcall_interactively (function=138878177,
record_flag=17313794, keys=138567212)
at callint.c:862
#10 0x0813122c in Fcommand_execute (cmd=138878177, record_flag=138510353,
keys=16, special=16)
at keyboard.c:9682
#11 0x08125aee in command_loop_1 () at keyboard.c:1740
#12 0x081885ee in internal_condition_case (bfun=0x8125730 <command_loop_1>,
handlers=138571281,
hfun=0x8125210 <cmd_error>) at eval.c:1333
#13 0x0812556e in command_loop_2 () at keyboard.c:1271
#14 0x0818812b in internal_catch (tag=16, func=0x8125540 <command_loop_2>,
arg=138510353) at eval.c:1094
#15 0x0812550e in command_loop () at keyboard.c:1250
#16 0x08124f94 in recursive_edit_1 () at keyboard.c:961
#17 0x081250d1 in Frecursive_edit () at keyboard.c:1022
#18 0x081237d0 in main (argc=2, argv=0xbffffa54) at emacs.c:1693
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Crash when defining function named with a number,
Matthew Mundell <=