GNU bug report logs - #6835
23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Tue, 10 Aug 2010 01:05:02 UTC

Severity: normal

Found in version 23.2

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a
	Fatal error (11) Segmentation fault
Date: Mon, 09 Aug 2010 21:23:37 -0600
MON KEY wrote:
> eval'ing `type-of' with #[abc] gets me Fatal error (11) Segmentation fault
> 
> emacs -Q
> 
> To reproduce enter:
> (type-of  #[abc])
> 
> type C-x C-e `eval-last-sexp'
> 
> Get hosed with:
> => Fatal error (11)Segmentation fault
> 
> "GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.0)
>  of 2010-05-10"

GNU Emacs 23.2.1 (i386-apple-darwin8.11.1, NS apple-appkit-824.48) of 2010-05-14

and

GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08

don't crash, but they both produce these results:

(type-of #[abc])
⇒ compiled-function

(functionp #[abc])
⇒ t

(funcall #[abc])
⇒ Debugger entered--Lisp error: (invalid-function #[abc])

Shouldn't anything that satisfies functionp be a valid argument to funcall?

Shouldn't the COMPILEDP macro in lisp.h be more strict about the number and type
of vector elements?  The "Byte-Code Function Objects" node of the Elisp manual
says:

   A byte-code function object must have at least four elements; there
is no maximum number, but only the first six elements have any normal
use.  They are:

ARGLIST
     The list of argument symbols.

BYTE-CODE
     The string containing the byte-code instructions.

CONSTANTS
     The vector of Lisp objects referenced by the byte code.  These
     include symbols used as function names and variable names.

STACKSIZE
     The maximum stack size this function needs.

DOCSTRING
     The documentation string (if any); otherwise, `nil'.  The value may
     be a number or a list, in case the documentation string is stored
     in a file.  Use the function `documentation' to get the real
     documentation string (*note Accessing Documentation::).

INTERACTIVE
     The interactive spec (if any).  This can be a string or a Lisp
     expression.  It is `nil' for a function that isn't interactive.


-- 
Kevin Rodgers
Denver, Colorado, USA





This bug report was last modified 14 years and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.