From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48446: 28.0.50; Native compile failure during bootstrap Date: Sat, 15 May 2021 20:17:00 +0300 Message-ID: <83im3jx6gj.fsf@gnu.org> References: <87tun4osqg.fsf@md5i.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35427"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , 48446@debbugs.gnu.org To: Michael Welsh Duggan , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 19:18:21 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhxvh-00090s-SM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 19:18:21 +0200 Original-Received: from localhost ([::1]:40568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhxvf-0004pB-T6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 13:18:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhxvO-0004oy-K4 for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 13:18:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhxvN-0001F8-RO for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 13:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhxvN-0006D7-Mn for bug-gnu-emacs@gnu.org; Sat, 15 May 2021 13:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 May 2021 17:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48446 X-GNU-PR-Package: emacs Original-Received: via spool by 48446-submit@debbugs.gnu.org id=B48446.162109903123814 (code B ref 48446); Sat, 15 May 2021 17:18:01 +0000 Original-Received: (at 48446) by debbugs.gnu.org; 15 May 2021 17:17:11 +0000 Original-Received: from localhost ([127.0.0.1]:49155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhxuY-0006C2-QE for submit@debbugs.gnu.org; Sat, 15 May 2021 13:17:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhxuX-0006Bq-GN for 48446@debbugs.gnu.org; Sat, 15 May 2021 13:17:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49754) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhxuR-0000p6-SL; Sat, 15 May 2021 13:17:03 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4938 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhxuR-0002mD-6P; Sat, 15 May 2021 13:17:03 -0400 In-Reply-To: <87tun4osqg.fsf@md5i.com> (message from Michael Welsh Duggan on Sat, 15 May 2021 12:40:39 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206613 Archived-At: > From: Michael Welsh Duggan > Date: Sat, 15 May 2021 12:40:39 -0400 > > I'm attempting to build the native compile using NATIVE_FULL_AOT=1 from > the master branch from scratch. I'm building from repository revision > 46e4704e2abca4d264a43965f92eab7608211ee6. > > During the final elisp compilation phase the process segfaults. > > I've attached my config.log and the make output. I'm using libgccjit > version 10.2.1-6 from Debian unstable. This seems to be due to the call to minibuffer-inactive-mode at startup. Andrea, can you help here? The problem is in set_minibuffer_mode, which is called from init_minibuf_once_for_pdumper: static void set_minibuffer_mode (Lisp_Object buf, EMACS_INT depth) { ptrdiff_t count = SPECPDL_INDEX (); record_unwind_current_buffer (); Fset_buffer (buf); if (depth > 0) { if (!NILP (Ffboundp (Qminibuffer_mode))) call0 (Qminibuffer_mode); } else { if (!NILP (Ffboundp (Qminibuffer_inactive_mode))) call0 (Qminibuffer_inactive_mode); <<<<<<<<<<<<<<<<<<<<<<<<<< else Fkill_all_local_variables (); } buf = unbind_to (count, buf); } In this call, I see the following backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x01261804 in funcall_subr (subr=0x5cfb174, numargs=0, args=0x82f510) at eval.c:3109 #2 0x01261294 in Ffuncall (nargs=1, args=0x82f508) at eval.c:3036 #3 0x0126055c in call0 (fn=XIL(0xa6e0)) at eval.c:2889 #4 0x011c423e in set_minibuffer_mode (buf=XIL(0xa0000000060e0414), depth=0) at minibuf.c:998 #5 0x011c9846 in init_minibuf_once_for_pdumper () at minibuf.c:2301 #6 0x0122bd60 in pdumper_load ( dump_filename=0xfc1f80 "D:\\gnu\\git\\emacs\\native-comp\\src\\emacs.pdmp",argv0=0xfc1f38 "D:\\gnu\\git\\emacs\\native-comp\\src\\emacs.exe") at pdumper.c:5668 #7 0x0115d674 in load_pdump (argc=11, argv=0xa442c0) at emacs.c:901 #8 0x0115dd57 in main (argc=11, argv=0xa442c0) at emacs.c:1306 Lisp Backtrace: "minibuffer-inactive-mode" (0x82f510) (gdb) fr 1 #1 0x01261804 in funcall_subr (subr=0x5cfb174, numargs=0, args=0x82f510) at eval.c:3109 3109 return (subr->function.a0 ()); (gdb) p subr->function.a0 $1 = (Lisp_Object (*)(void)) 0x0 Note that subr->function.a0 is a NULL pointer, which is why it crashes. Here's the subr->function object in its entirety: (gdb) fr 1 #1 0x01261804 in funcall_subr (subr=0x5cfb174, numargs=0, args=0x82f510) at eval.c:3109 3109 return (subr->function.a0 ()); (gdb) p subr $7 = (struct Lisp_Subr *) 0x5cfb174 (gdb) p *subr $8 = { header = { size = 1342205952 }, function = { a0 = 0x0, a1 = 0x0, a2 = 0x0, a3 = 0x0, a4 = 0x0, a5 = 0x0, a6 = 0x0, a7 = 0x0, a8 = 0x0, aUNEVALLED = 0x0, aMANY = 0x0 }, min_args = 0, max_args = 0, symbol_name = 0x628fb24 "minibuffer-inactive-mode", { intspec = 0x5cfb1b4 "@ז", native_intspec = XIL(0xc000000005cfb1b4) }, doc = 146, native_comp_u = {XIL(0xa000000005a97cbc)}, native_c_name = { 0x628fb3d "F6d696e696275666665722d696e6163746976652d6d6f6465_minibuffer_inactive_mode_0"}, lambda_list = {XIL(0)}, type = {XIL(0xc000000005a71394)} } As you see, the native_comp_u member is non-NULL. But still Ffuncall called funcall_subr, which AFAIU means it thought that Qminibuffer_inactive_mode is not a natively-compiled function. What are we missing in this case? why doesn't Emacs recognize Qminibuffer_inactive_mode as a natively-compiled function? Is this too early during startup, and if so, how to we call Lisp at this stage? TIA