Subject: Re: bug#65640: 30.0.50; segfault when building emacs with native-comp

From: Eli Zaretskii <[email-masked]>
Date: Fri, 01 Sep 2023 18:28:42 +0300

> Date: Fri, 01 Sep 2023 10:05:52 -0500
> From: LemonBreezes <[email-masked]>
> Cc: [email-masked]
> 
> Okay. So I noticed that even though Emacs was running, the native
> compiler was segfaulting in the background. So I recompiled Emacs with
> GCC and no optimizations nor patches and I still see that native compilation is
> segfaulting on org-element.el. I have attached some verbose logs:
> https://0x0.st/HpjT.txt
> 
> I don't know how to get a backtrace. If I run Emacs with GDB, libgccjit
> gives me a segfault in the *Async-native-compile-log* but Emacs itself
> does not segfault.

What happens if you compile org-element.el by invoking
emacs-lisp-native-compile?  That is:

  emacs -Q
  C-x C-f lisp/org/org-element.el RET
  M-x emacs-lisp-native-compile RET

Does Emacs crash if you do the above?  If so, run the above under GDB,
and show the backtrace.

Thanks.