emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changed dlopen flags in dynlib.c, gccemacs crash


From: Eli Zaretskii
Subject: Re: changed dlopen flags in dynlib.c, gccemacs crash
Date: Thu, 09 Dec 2021 10:37:49 +0200

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]