unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: hx <silent2600@gmail.com>, Andrea Corallo <akrl@sdf.org>
Cc: emacs-devel@gnu.org
Subject: Re: changed dlopen flags in dynlib.c, gccemacs crash
Date: Thu, 09 Dec 2021 10:37:49 +0200	[thread overview]
Message-ID: <83lf0uuqaq.fsf@gnu.org> (raw)
In-Reply-To: <CAALPCHvsMZPzKJcSjWuzuANFUKoxRyRPLCfidi=uRB0MULz7Ww@mail.gmail.com> (message from hx on Thu, 9 Dec 2021 08:51:03 +0800)

> From: hx <silent2600@gmail.com>
> Date: Thu, 9 Dec 2021 08:51:03 +0800
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
> remove the directory (28.0.90-xxx) from ~/.emacs.d/eln-cache/,
> start emacs with -nw -q, it will crash after a few seconds without any operation.
> after that, it will crash immediately when I start it with the same parameters.

It doesn't crash when I try reproducing it, so something is missing
from the recipe.  Is this with an unmodified Emacs 28.0.90, or is it
with your change in dynlib.c?

Anyway, does the patch below help?

Andrea, any better ideas?  I don't understand the reason for the
crash, as we seem to have defenses against this in Fnative_elisp_load,
so I'm probably missing something.

diff --git a/src/comp.c b/src/comp.c
index 43feac6..42eb0af 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5191,6 +5191,8 @@ DEFUN ("comp--register-lambda", Fcomp__register_lambda, Scomp__register_lambda,
    Lisp_Object maxarg, Lisp_Object type, Lisp_Object rest,
    Lisp_Object comp_u)
 {
+  CHECK_CONS (rest);
+
   Lisp_Object doc_idx = FIRST (rest);
   Lisp_Object intspec = SECOND (rest);
   struct Lisp_Native_Comp_Unit *cu = XNATIVE_COMP_UNIT (comp_u);



  reply	other threads:[~2021-12-09  8:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  6:01 changed dlopen flags in dynlib.c, gccemacs crash hx
2021-12-08 13:15 ` Eli Zaretskii
2021-12-09  0:51   ` hx
2021-12-09  8:37     ` Eli Zaretskii [this message]
2021-12-09 10:53       ` Andrea Corallo
2021-12-09 12:08         ` Eli Zaretskii
2021-12-09 20:47           ` Andrea Corallo
2021-12-11  2:29       ` hx
2021-12-11  8:23         ` Eli Zaretskii
2021-12-11 18:09           ` Andrea Corallo
2021-12-11 18:23             ` Eli Zaretskii
2021-12-11 20:53               ` Andrea Corallo
2021-12-15 15:26                 ` Andrea Corallo
2021-12-15 16:59                   ` Eli Zaretskii
2022-03-06 14:32             ` Philipp Stephani
2022-03-06 15:32               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lf0uuqaq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=silent2600@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).