GNU bug report logs - #24673
25.1.50; Evaluating '((closure))' aborts Emacs

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Wed, 12 Oct 2016 10:28:02 UTC

Severity: normal

Tags: fixed

Found in version 25.1.50

Fixed in version 25.2

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24673 in the body.
You can then email your comments to 24673 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24673; Package emacs. (Wed, 12 Oct 2016 10:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Politz <politza <at> hochschule-trier.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Oct 2016 10:28:02 GMT) Full text and rfc822 format available.

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

From: Andreas Politz <politza <at> hochschule-trier.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; Evaluating '((closure))' aborts Emacs
Date: Wed, 12 Oct 2016 12:26:24 +0200
emacs -Q

M-x ((closure)) RET

=> eval.c:2845: Emacs fatal error: assertion failed: CONSP (fun)

The function takes the (XCAR (XCDR '((closure)))), which is not a good
idea, since XCDR returns Qnil, while XCAR expects a cons. 


static Lisp_Object
funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
		register Lisp_Object *arg_vector)
{
  ....        
  if (CONSP (fun))
    {
      if (EQ (XCAR (fun), Qclosure))
	{
	  fun = XCDR (fun);	/* Drop `closure'.  */
	  lexenv = XCAR (fun);                 <============ 2845
	  CHECK_LIST_CONS (fun, fun);
	}
        ...
    }
  else ...
}

-ap




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24673; Package emacs. (Wed, 12 Oct 2016 20:53:01 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Andreas Politz <politza <at> hochschule-trier.de>, 24673 <at> debbugs.gnu.org
Subject: Re: bug#24673: 25.1.50; Evaluating '((closure))' aborts Emacs
Date: Wed, 12 Oct 2016 20:52:12 +0000
[Message part 1 (text/plain, inline)]
Andreas Politz <politza <at> hochschule-trier.de> schrieb am Mi., 12. Okt. 2016
um 12:28 Uhr:

>
>
> emacs -Q
>
>
>
> M-x ((closure)) RET
>
>
>
> => eval.c:2845: Emacs fatal error: assertion failed: CONSP (fun)
>
>
>
Thanks for reporting, if nobody complains I'll push the attached patch to
emacs-25.
[Message part 2 (text/html, inline)]
[0001-Fix-crash-in-evaluating-functions.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24673; Package emacs. (Wed, 12 Oct 2016 21:25:01 GMT) Full text and rfc822 format available.

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

From: Robert Cochran <robert-emacs <at> cochranmail.com>
To: Andreas Politz <politza <at> hochschule-trier.de>
Cc: 24673 <at> debbugs.gnu.org
Subject: Re: bug#24673: 25.1.50; Evaluating '((closure))' aborts Emacs
Date: Wed, 12 Oct 2016 14:23:46 -0700
Andreas Politz <politza <at> hochschule-trier.de> writes:

> M-x ((closure)) RET

This is probably a brain-o, but `M-x ((closure))` prompts a "[No match]"
response on my machine. Perhaps you meant `M-:`?

If that's the case, then doing `M-: ((closure))` causes a SIGSEGV on
master's 6d6c93f4 with a non-debug build.

HTH,
-- 
~Robert Cochran

GPG Fingerprint - E778 2DD4 FEA6 6A68 6F26  AD2D E5C3 EB36 4886 8871




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24673; Package emacs. (Thu, 13 Oct 2016 05:52:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 24673 <at> debbugs.gnu.org, politza <at> hochschule-trier.de
Subject: Re: bug#24673: 25.1.50; Evaluating '((closure))' aborts Emacs
Date: Thu, 13 Oct 2016 08:51:26 +0300
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Wed, 12 Oct 2016 20:52:12 +0000
> 
>  emacs -Q
> 
>  M-x ((closure)) RET
> 
>  => eval.c:2845: Emacs fatal error: assertion failed: CONSP (fun)
> 
> Thanks for reporting, if nobody complains I'll push the attached patch to emacs-25.

I'm okay with the eval.c patch being pushed to emacs-25, but please
don't push the test there, push it to master instead (and to the
appropriate directory), as merging tests from emacs-25 frequently
produces problems due to the changes in directory structure.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24673; Package emacs. (Thu, 13 Oct 2016 11:14:01 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24673 <at> debbugs.gnu.org, politza <at> hochschule-trier.de
Subject: Re: bug#24673: 25.1.50; Evaluating '((closure))' aborts Emacs
Date: Thu, 13 Oct 2016 11:13:18 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Do., 13. Okt. 2016 um 07:51 Uhr:

> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
>
> > Date: Wed, 12 Oct 2016 20:52:12 +0000
>
> >
>
> >  emacs -Q
>
> >
>
> >  M-x ((closure)) RET
>
> >
>
> >  => eval.c:2845: Emacs fatal error: assertion failed: CONSP (fun)
>
> >
>
> > Thanks for reporting, if nobody complains I'll push the attached patch
> to emacs-25.
>
>
>
> I'm okay with the eval.c patch being pushed to emacs-25, but please
>
> don't push the test there, push it to master instead (and to the
>
> appropriate directory), as merging tests from emacs-25 frequently
>
> produces problems due to the changes in directory structure.
>
>
>
OK, pushed a slight variant that signals invalid-function instead of
wrong-type-argument.
[Message part 2 (text/html, inline)]

Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 05 Nov 2016 13:47:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.2, send any further explanations to 24673 <at> debbugs.gnu.org and Andreas Politz <politza <at> hochschule-trier.de> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 05 Nov 2016 13:47:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 195 days ago.

Previous Next


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