unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chang Xiaoduan <drcxd@sina.com>
Cc: 67900@debbugs.gnu.org, acorallo@gnu.org
Subject: bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer'
Date: Fri, 22 Dec 2023 09:41:27 +0200	[thread overview]
Message-ID: <83msu2fzvc.fsf@gnu.org> (raw)
In-Reply-To: <m3ttoaaojq.fsf@sina.com> (message from Chang Xiaoduan on Fri, 22 Dec 2023 11:44:57 +0800)

> From: Chang Xiaoduan <drcxd@sina.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  67900@debbugs.gnu.org
> Date: Fri, 22 Dec 2023 11:44:57 +0800
> 
> Andrea Corallo <acorallo@gnu.org> writes:
> 
> > But before starting with a blind bisect I think we should try if any of
> > the .eln present in the back trace is the responsible, AFAICS those are:
> > bytecomp.el, mule.el, startup.el (with the first being the suspect nr1).
> 
> I also use Emacs with the same configuration on a Linux system and it
> has never crashed while I have been experiencing frequent crashes on
> Windows. I think it is not reproducible on Linux.
> 
> I have tried to build Emacs with native-compilation on and added a
> file-local prop-line in consult.el setting `native-comp-speed` to 1. The
> eln cache produced does not trigger the crash. After setting the
> file-local property `native-comp-spped` back to 2, I easily reproduced
> the crash. Does this indicate that the miscompiled code is inside
> consult.el?

It could, but see what Andrea wrote above: it could also be the fault
of a few other packages involved in this.

So please build Emacs with those 3 packages (bytecomp.el, mule.el,
startup.el) natively-compiled with native-comp-speed = 1, then
native-compile consult.el with native-comp-speed = 2, and see if you
still see the crashes.  If yes, then consult.el is probably the one
that triggers the bug.  If compiling those 3 other packages with
native-comp-speed = 1 eliminates the crashes, then we need to look for
the one of those 3 which triggers the crash, and continue narrowing
this down from there.

> I try to find out the minimal code that can reproduce the issue by
> starting an Emacs instance with the -Q option. Then I copy the
> definition of `consult-buffer` into this instance and evaluate it. If
> there is an error, such as missing definition, I try to fix the error by
> copying more code and evaluating them. Finally I reached a point that
> `consult-buffer` can be executed with no error reported. However, when I
> save all copied code to an el file and load it with a clean Emacs (with
> -Q option) then I evaluate the buffer and execute `consult-buffer` there
> is an error! I have tried this process twice: copying any required code
> and execute them piece by piece until `consult-buffer` can be executed
> correctly, saving the whole code as an el file then trying to evaluate
> it with another clean Emacs instance, it always fails to execute
> `consult-buffer` after I evaluate the whole buffer all at once. I have
> no idead why this happens since I know not much about emacs lisp.

What is the error you see after you evaluate the whole code?  It might
be that the order of the code in the el file matters, and you need to
reorder the functions and variables there.

But I think finding the minimal Lisp code which, when native-compiled
with native-comp-speed = 2, triggers the crashes is more important.

Thanks.





  reply	other threads:[~2023-12-22  7:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19  7:48 bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer' Chang Xiaoduan
2023-12-19 13:16 ` Eli Zaretskii
     [not found]   ` <m3msu5751x.fsf@sina.com>
2023-12-20 13:10     ` Eli Zaretskii
2023-12-21  3:26       ` Chang Xiaoduan
2023-12-21  8:02         ` Eli Zaretskii
2023-12-21 12:40           ` Andrea Corallo
2023-12-22  3:44             ` Chang Xiaoduan
2023-12-22  7:41               ` Eli Zaretskii [this message]
2023-12-22  9:38                 ` Andrea Corallo
2023-12-23  2:30                 ` Chang Xiaoduan
2023-12-23  7:35                   ` Eli Zaretskii
2023-12-26  8:32                     ` Andrea Corallo
2023-12-28 11:44                       ` Chang Xiaoduan
2023-12-29 18:37                         ` Andrea Corallo
2024-01-02  7:24                           ` Chang Xiaoduan
2024-01-04  9:51                             ` Andrea Corallo
2024-01-05  7:04                               ` Chang Xiaoduan
2024-01-05 21:46                                 ` Andrea Corallo
2024-01-08  3:28                                   ` Chang Xiaoduan
2024-01-08 10:35                                     ` Andrea Corallo
2024-01-08 11:40                                       ` Chang Xiaoduan
2024-01-09  9:58                                         ` Andrea Corallo
2024-01-02  8:20                           ` Chang Xiaoduan
2024-01-04  9:58                             ` Andrea Corallo
2024-01-05  4:22                             ` Richard Stallman
2024-01-05  7:09                               ` Chang Xiaoduan
2024-01-07  4:29                                 ` Richard Stallman

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=83msu2fzvc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67900@debbugs.gnu.org \
    --cc=acorallo@gnu.org \
    --cc=drcxd@sina.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).