From unknown Mon Jun 23 23:49:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6835 <6835@debbugs.gnu.org> To: bug#6835 <6835@debbugs.gnu.org> Subject: Status: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault Reply-To: bug#6835 <6835@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:49:13 +0000 retitle 6835 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error= (11) Segmentation fault reassign 6835 emacs submitter 6835 MON KEY severity 6835 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 21:04:13 2010 Received: (at submit) by debbugs.gnu.org; 10 Aug 2010 01:04:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OidGH-0003mu-8n for submit@debbugs.gnu.org; Mon, 09 Aug 2010 21:04:13 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OidGF-0003mo-DW for submit@debbugs.gnu.org; Mon, 09 Aug 2010 21:04:11 -0400 Received: from lists.gnu.org ([199.232.76.165]:48998) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OidGw-00032e-6s for submit@debbugs.gnu.org; Mon, 09 Aug 2010 21:04:54 -0400 Received: from [140.186.70.92] (port=55514 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OidGu-00059d-Rx for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2010 21:04:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OidGt-0000sR-Qh for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2010 21:04:52 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:65510) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OidGt-0000sK-LR for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2010 21:04:51 -0400 Received: by wyg36 with SMTP id 36so11880827wyg.0 for ; Mon, 09 Aug 2010 18:04:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.146.213 with SMTP id i21mr14525378wbv.99.1281402290260; Mon, 09 Aug 2010 18:04:50 -0700 (PDT) Received: by 10.216.49.84 with HTTP; Mon, 9 Aug 2010 18:04:50 -0700 (PDT) Date: Mon, 9 Aug 2010 21:04:50 -0400 X-Google-Sender-Auth: 1ZCfowicjNuKX2mDxEtKrKTjAT4 Message-ID: Subject: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault From: MON KEY To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) 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" -- /s_P\ From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 23:23:22 2010 Received: (at submit) by debbugs.gnu.org; 10 Aug 2010 03:23:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OifQv-0004oT-Lv for submit@debbugs.gnu.org; Mon, 09 Aug 2010 23:23:22 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OifQs-0004oO-Ik for submit@debbugs.gnu.org; Mon, 09 Aug 2010 23:23:20 -0400 Received: from lists.gnu.org ([199.232.76.165]:38779) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OifRZ-0003iB-FN for submit@debbugs.gnu.org; Mon, 09 Aug 2010 23:24:01 -0400 Received: from [140.186.70.92] (port=60034 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OifRX-0004OP-UM for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2010 23:24:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OifRW-0004zl-S2 for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2010 23:23:59 -0400 Received: from lo.gmane.org ([80.91.229.12]:45248) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OifRW-0004zX-HP for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2010 23:23:58 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OifRQ-00078z-VV for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2010 05:23:52 +0200 Received: from c-67-166-3-76.hsd1.co.comcast.net ([67.166.3.76]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Aug 2010 05:23:52 +0200 Received: from kevin.d.rodgers by c-67-166-3-76.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Aug 2010 05:23:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers 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 Lines: 70 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-67-166-3-76.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 02:46:59 2010 Received: (at 6835) by debbugs.gnu.org; 10 Aug 2010 06:46:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oiiby-00069T-M8 for submit@debbugs.gnu.org; Tue, 10 Aug 2010 02:46:59 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oiibw-00069N-Sp for 6835@debbugs.gnu.org; Tue, 10 Aug 2010 02:46:57 -0400 Received: by wwb17 with SMTP id 17so2513431wwb.15 for <6835@debbugs.gnu.org>; Mon, 09 Aug 2010 23:47:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.232.144 with SMTP id n16mr14828669weq.1.1281422859654; Mon, 09 Aug 2010 23:47:39 -0700 (PDT) Received: by 10.216.49.84 with HTTP; Mon, 9 Aug 2010 23:47:39 -0700 (PDT) Date: Tue, 10 Aug 2010 02:47:39 -0400 X-Google-Sender-Auth: oQzjrP4Y55SZVWEBzHM0yjElm_Q Message-ID: Subject: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault From: MON KEY To: 6835@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6835 Cc: kevin.d.rodgers@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) > 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: I'm able to reproduce this w/ 23.2 on a second machine: "GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.14.7) of 2010-05-10" > Shouldn't anything that satisfies functionp be a valid argument to > funcall? I think it is the wrong question. Why can't/shouldn't the `#' read restrictions be made less "complicated"? > 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: Yes well, this may bring us circuitously semi-circle to bug#6486 (URL `http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-06/msg00486.html') Abstractly, I just don't understand the rationale for the nuanced restrictions placed on the reader w/re `#'. It seems to cause just as many "complicated problems" as presumably it was intended to solve. Moreover, we now have a new hash-table read-syntax so... WTF? ,---- (info "(elisp)Creating Hash") | You can also create a new hash table using the printed | representation for hash tables. The Lisp reader can read this | printed representation, provided each element in the specified hash | table has a valid read syntax (see Printed Representation). For | instance, the following specifies a new hash table containing the | keys `key1' and `key2' (both symbols) associated with `val1' (a | symbol) and `300' (a number) respectively. | | #s(hash-table size 30 data (key1 val1 key2 300)) `---- (setq bubbas-hash #s(hash-table size 30 data (key1 val1 key2 300))) ;=> #s(hash-table {...} )) bubbas-hash ;=> #s(hash-table {...} )) (gethash 'key1 bubbas-hash) ;=> val1 (type-of (symbol-value 'bubbas-hash)) ;=> hash-table IOW, I can successfully interrogate a hash-table type and this pathological corner-case too: (type-of #'(lambda)) ;=> cons but woe be it to she who slips up and does: (type-of #[say goodbye to your current-session ... now]) Which reminds me, how are the the Guile folks planning on handling this with Guile-Elisp? There may be some _nasty_ bugs/headaches working around the current elisp reader restrictions e.g. #t and #f and more specifically #:keywords. Following from a fairly recent draft of the Guile manual: ,---- | (read-set! keywords 'prefix) | | #:type | ;=> #:type | | :type | ;=> #:type | | (read-set! keywords 'postfix) | type: | ;=> #:type | | :type | ;=> :type | | (read-set! keywords #f) | #:type | ;=> #:type `---- Did you catch that last one? We eval #f -- the Scheme equivalent of nil and/or '(); and we get a potentially bogus error prone elisp on return. Whoopee. Looks likes someone's syntactic jujitsu (most likely born of political infighting and vengeful bone to pick) might wind up biting back 20+ years later. > Kevin Rodgers -- /s_P\ From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 04:26:44 2010 Received: (at submit) by debbugs.gnu.org; 10 Aug 2010 08:26:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OikAW-0006nz-Gl for submit@debbugs.gnu.org; Tue, 10 Aug 2010 04:26:44 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OikAU-0006ns-6q for submit@debbugs.gnu.org; Tue, 10 Aug 2010 04:26:43 -0400 Received: from lists.gnu.org ([199.232.76.165]:35915) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OikBB-00056w-Gn for submit@debbugs.gnu.org; Tue, 10 Aug 2010 04:27:25 -0400 Received: from [140.186.70.92] (port=41496 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OikB9-0002KJ-4k for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2010 04:27:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OikB8-0005hD-5E for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2010 04:27:23 -0400 Received: from impaqm5.telefonica.net ([213.4.138.5]:33707) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OikB8-0005gs-02 for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2010 04:27:22 -0400 Received: from IMPmailhost4.adm.correo ([10.20.102.125]) by IMPaqm5.telefonica.net with bizsmtp id sXi71e00D2iL0W23RYTLad; Tue, 10 Aug 2010 10:27:20 +0200 Received: from ceviche.home ([83.40.4.203]) by IMPmailhost4.adm.correo with BIZ IMP id sYTK1e00K4NokFF1kYTLky; Tue, 10 Aug 2010 10:27:20 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 7396F66138; Tue, 10 Aug 2010 10:27:19 +0200 (CEST) From: Stefan Monnier To: Kevin Rodgers Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault Message-ID: References: Date: Tue, 10 Aug 2010 10:27:19 +0200 In-Reply-To: (Kevin Rodgers's message of "Mon, 09 Aug 2010 21:23:37 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) > (functionp #[abc]) > =E2=87=92 t > (funcall #[abc]) > =E2=87=92 Debugger entered--Lisp error: (invalid-function #[abc]) > Shouldn't anything that satisfies functionp be a valid argument to funcal= l? Yes and no. Should (lambda 3) be accepted by functionp? What about (lambda () . 3) ? What about (lambda () (+ . 1)) and other errors? #[abc] is an object of "function type", which is why functionp returns t. I don't think that it's terribly important if when calling it, you get an error, since that can happen for syntactically valid functions as well. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 17:14:02 2010 Received: (at 6835-done) by debbugs.gnu.org; 10 Aug 2010 21:14:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oiw93-0004Rc-QV for submit@debbugs.gnu.org; Tue, 10 Aug 2010 17:14:02 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oiw92-0004RV-1F for 6835-done@debbugs.gnu.org; Tue, 10 Aug 2010 17:14:00 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id CD12A1C007DF; Tue, 10 Aug 2010 23:14:43 +0200 (CEST) Received: from igel.home (ppp-88-217-111-172.dynamic.mnet-online.de [88.217.111.172]) by mail.mnet-online.de (Postfix) with ESMTP id B9B0E1C0008D; Tue, 10 Aug 2010 23:14:43 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 4FE32CA297; Tue, 10 Aug 2010 23:14:43 +0200 (CEST) From: Andreas Schwab To: MON KEY Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault References: X-Yow: It's NO USE.. I've gone to ``CLUB MED''!! Date: Tue, 10 Aug 2010 23:14:42 +0200 In-Reply-To: (MON KEY's message of "Mon, 9 Aug 2010 21:04:50 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6835-done Cc: 6835-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) MON KEY writes: > eval'ing `type-of' with #[abc] gets me Fatal error (11) Segmentation fault This is already fixed (and has nothing to do with type-of). Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 01:42:00 2010 Received: (at submit) by debbugs.gnu.org; 11 Aug 2010 05:42:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj44e-0007nZ-DK for submit@debbugs.gnu.org; Wed, 11 Aug 2010 01:42:00 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj44c-0007nS-Af for submit@debbugs.gnu.org; Wed, 11 Aug 2010 01:41:59 -0400 Received: from lists.gnu.org ([199.232.76.165]:38318) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Oj45M-000479-1L for submit@debbugs.gnu.org; Wed, 11 Aug 2010 01:42:44 -0400 Received: from [140.186.70.92] (port=45051 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oj45K-0003aD-LT for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 01:42:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oj45J-000628-Ay for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 01:42:42 -0400 Received: from lo.gmane.org ([80.91.229.12]:49691) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj45I-00061r-U1 for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 01:42:41 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oj45C-0002uJ-AC for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 07:42:34 +0200 Received: from c-67-166-3-76.hsd1.co.comcast.net ([67.166.3.76]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Aug 2010 07:42:34 +0200 Received: from kevin.d.rodgers by c-67-166-3-76.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Aug 2010 07:42:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault Date: Tue, 10 Aug 2010 23:42:20 -0600 Lines: 45 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-67-166-3-76.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) Stefan Monnier wrote: >> (functionp #[abc]) >> ⇒ t > >> (funcall #[abc]) >> ⇒ Debugger entered--Lisp error: (invalid-function #[abc]) > >> Shouldn't anything that satisfies functionp be a valid argument to funcall? > > Yes and no. Should (lambda 3) be accepted by functionp? What about > (lambda () . 3) ? What about (lambda () (+ . 1)) and other errors? Hi Stefan, I don't see why those examples should satisfy functionp. The Elisp manual says: -- Function: functionp object This function returns `t' if OBJECT is any kind of function, i.e. can be passed to `funcall'. Note that `functionp' returns `nil' for special forms (*note Special Forms::). I think your examples are merely cons objects that look like lambda expressions (a function subtype) but are not. Note that type-of returns cons for both valid lambda expressions and those examples, i.e. it does not distinguish special list structures as separate types (e.g. alists, lambda expressions). Likewise, type-of does not distinguish obarrays from non-obarray vectors. I think type-of should either return the most specific type that the object satisfies or the most general type, but not the most specific for some things (e.g. functions) and the most general for others (e.g. lists, vectors). > #[abc] is an object of "function type", which is why functionp > returns t. I don't think that it's terribly important if when calling > it, you get an error, since that can happen for syntactically valid > functions as well. But it is useful to know whether the error is signaled by funcall or by the function. And a careful programmer ought to be able to avoid the former by guarding the funcall form with functionp. -- Kevin Rodgers Denver, Colorado, USA From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 16:19:47 2010 Received: (at submit) by debbugs.gnu.org; 11 Aug 2010 20:19:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjHm7-0006IM-8h for submit@debbugs.gnu.org; Wed, 11 Aug 2010 16:19:47 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjHm5-0006IG-7N for submit@debbugs.gnu.org; Wed, 11 Aug 2010 16:19:45 -0400 Received: from lists.gnu.org ([199.232.76.165]:56946) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OjHmq-0001MF-KB for submit@debbugs.gnu.org; Wed, 11 Aug 2010 16:20:32 -0400 Received: from [140.186.70.92] (port=59367 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjHmm-0001wF-62 for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 16:20:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjHmk-0007ni-UB for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 16:20:28 -0400 Received: from impaqm2.telefonica.net ([213.4.138.2]:59814) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjHmk-0007nN-Ng for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2010 16:20:26 -0400 Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm2.telefonica.net with bizsmtp id t8KR1e01C2h2L9m3M8LRVC; Wed, 11 Aug 2010 22:20:25 +0200 Received: from ceviche.home ([83.40.4.203]) by IMPmailhost3.adm.correo with BIZ IMP id t8LQ1e0084NokFF1j8LRzk; Wed, 11 Aug 2010 22:20:25 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 699F2660F0; Wed, 11 Aug 2010 22:20:24 +0200 (CEST) From: Stefan Monnier To: Kevin Rodgers Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault Message-ID: References: Date: Wed, 11 Aug 2010 22:20:24 +0200 In-Reply-To: (Kevin Rodgers's message of "Tue, 10 Aug 2010 23:42:20 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) >> Yes and no. Should (lambda 3) be accepted by functionp? What about >> (lambda () . 3) ? What about (lambda () (+ . 1)) and other errors? > I don't see why those examples should satisfy functionp. The Elisp > manual says: Because (lambda () 1) is a valid function that can be passed to `funcall'. > I think your examples are merely cons objects that look like lambda > expressions (a function subtype) but are not. They're both cons objects and functions. > But it is useful to know whether the error is signaled by funcall or > by the function. Why? Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 20:12:04 2010 Received: (at 6835) by debbugs.gnu.org; 12 Aug 2010 00:12:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjLOu-0007xI-3J for submit@debbugs.gnu.org; Wed, 11 Aug 2010 20:12:04 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjLOr-0007ww-J4 for 6835@debbugs.gnu.org; Wed, 11 Aug 2010 20:12:02 -0400 Received: by wwb18 with SMTP id 18so925453wwb.15 for <6835@debbugs.gnu.org>; Wed, 11 Aug 2010 17:12:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.157.81 with SMTP id n59mr17297309wek.84.1281571968520; Wed, 11 Aug 2010 17:12:48 -0700 (PDT) Received: by 10.216.181.4 with HTTP; Wed, 11 Aug 2010 17:12:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 11 Aug 2010 20:12:48 -0400 X-Google-Sender-Auth: 9DKrL254a0D1byNG9n3AbcPOrc4 Message-ID: Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault From: MON KEY To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 6835 Cc: 6835@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) On Tue, Aug 10, 2010 at 5:14 PM, Andreas Schwab wrote: > MON KEY writes: > >> eval'ing `type-of' with #[abc] gets me Fatal error (11) Segmentation fault > > This is already fixed (and has nothing to do with type-of). Why was this bug closed? Can you confirm you were able to reproduce the bug I reported? If it is indeed fixed would you please indicate (at least _something_) w/re to what the nature of the problem was/is and what was needed to fix it. This one caught me with a six day old Emacs session when it went down. It would be nice to know more about the nature of the thing that left me in a lurch. Your pithy dismissals that : "(and has nothing to do with type-of)." undermine (my) confidence that it has indeed been fixed esp. as `type-of' does consistently bring down my Emacs. If the problem is/was elsewhere I would like to know more about how you were able to make this determiation. FWIW I'm happy to continue finding corner cases related to this one and filing subsequent new reports in the absence of some explanation slightly more verbose than the presently one provided. > Andreas. -- /s_P\ From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 12 03:55:18 2010 Received: (at 6835) by debbugs.gnu.org; 12 Aug 2010 07:55:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjSdC-0002WD-67 for submit@debbugs.gnu.org; Thu, 12 Aug 2010 03:55:18 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjSd9-0002W8-PT for 6835@debbugs.gnu.org; Thu, 12 Aug 2010 03:55:16 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 7CCF91C16626; Thu, 12 Aug 2010 09:56:03 +0200 (CEST) Received: from hase.home (ppp-88-217-114-220.dynamic.mnet-online.de [88.217.114.220]) by mail.mnet-online.de (Postfix) with ESMTP id DB57B1C00217; Thu, 12 Aug 2010 09:56:02 +0200 (CEST) From: Andreas Schwab To: MON KEY Subject: Re: bug#6835: 23.2; eval'ing `type-of' with #[abc] as arg gets a Fatal error (11) Segmentation fault References: X-Yow: WHOA!! I'm having a RELIGIOUS EXPERIENCE right NOW!! Date: Thu, 12 Aug 2010 09:56:02 +0200 In-Reply-To: (MON KEY's message of "Wed, 11 Aug 2010 20:12:48 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6835 Cc: 6835@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) MON KEY writes: > Why was this bug closed? Because it is fixed. > what was needed to fix it. See make-byte-code. > `type-of' does consistently bring down my Emacs. Try without type-of. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 15 19:44:36 2010 Received: (at 6835) by debbugs.gnu.org; 15 Aug 2010 23:44:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkmsV-0006WT-Qs for submit@debbugs.gnu.org; Sun, 15 Aug 2010 19:44:35 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkmsU-0006WJ-G7; Sun, 15 Aug 2010 19:44:35 -0400 Received: by wyb40 with SMTP id 40so4978522wyb.3 for ; Sun, 15 Aug 2010 16:45:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.68.207 with SMTP id w15mr3975845wbi.75.1281915931463; Sun, 15 Aug 2010 16:45:31 -0700 (PDT) Received: by 10.216.65.140 with HTTP; Sun, 15 Aug 2010 16:45:31 -0700 (PDT) Date: Sun, 15 Aug 2010 19:45:31 -0400 X-Google-Sender-Auth: A-1hu4b9PpUanxetqEs8XYwblms Message-ID: Subject: bug#6855: 24.0.50; Bug in tool bar label handling From: MON KEY To: 6855@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 6835 Cc: 6835@debbugs.gnu.org, Andreas Schwab X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) > I don't agree. Emacs should be robust against type mismatches, > crashing is the worst possible reaction. Unless of course that robustness is requested of `type-of', in which case presumably Andreas waffles and TRT is to simply not use a type macthing feature that may cause Emacs to crash, e.g. this recent comment re bug#6835: ,---- | | > `type-of' does consistently bring down my Emacs. | | Try without type-of. | | Andreas. | `---- http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-08/msg00337.html :-P > Andreas. -- /s_P\ From unknown Mon Jun 23 23:49:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 13 Sep 2010 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator