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#46256: [feature/native-comp] AOT eln files ignored if run from build tree Date: Mon, 08 Mar 2021 20:13:35 +0200 Message-ID: <83pn09qzsg.fsf@gnu.org> References: <86eehujcip.fsf@gmail.com> <86blch14qt.fsf@gmail.com> <83h7m84h9g.fsf@gnu.org> <86v9ao5czu.fsf@gmail.com> <86wnutogrh.fsf@gmail.com> <86wnut8fb9.fsf@gmail.com> <861rd1tbpa.fsf@gmail.com> <83pn0km6y3.fsf@gnu.org> <86ft1f8ara.fsf@gmail.com> <83sg5cjdn8.fsf@gnu.org> <83r1kwjcy2.fsf@gnu.org> <8335x6u9o4.fsf@gnu.org> <83zgzesrku.fsf@gnu.org> <83tupms4mp.fsf@gnu.org> <83eegpspjk.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25538"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46256@debbugs.gnu.org, andrewjmoreton@gmail.com, akrl@sdf.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 08 19:31:15 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 1lJKex-0006ZC-KU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 19:31:15 +0100 Original-Received: from localhost ([::1]:58520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJKew-0007Hc-Kj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 13:31:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJKOI-00021t-Gq for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 13:14:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJKOI-0007qs-8n for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 13:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJKOI-0005BP-46 for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 13:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Mar 2021 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46256 X-GNU-PR-Package: emacs Original-Received: via spool by 46256-submit@debbugs.gnu.org id=B46256.161522722819893 (code B ref 46256); Mon, 08 Mar 2021 18:14:02 +0000 Original-Received: (at 46256) by debbugs.gnu.org; 8 Mar 2021 18:13:48 +0000 Original-Received: from localhost ([127.0.0.1]:44808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJKO4-0005An-53 for submit@debbugs.gnu.org; Mon, 08 Mar 2021 13:13:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJKO3-0005Aa-5y for 46256@debbugs.gnu.org; Mon, 08 Mar 2021 13:13:47 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52986) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJKNx-0007hE-Q4; Mon, 08 Mar 2021 13:13:41 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1828 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lJKNx-0007Y4-3O; Mon, 08 Mar 2021 13:13:41 -0500 In-Reply-To: (message from Pip Cet on Mon, 8 Mar 2021 14:27:19 +0000) 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:201860 Archived-At: > From: Pip Cet > Date: Mon, 8 Mar 2021 14:27:19 +0000 > Cc: Andrea Corallo , 46256@debbugs.gnu.org, andrewjmoreton@gmail.com > > I would be interested in the pseudovector type of the variable that is > supposed to be a comp_unit, but isn't. I think that's all the > information of value that debuggee still has... You mean, *saved_cu? It cannot be anything interesting, because the pointer is garbled: (gdb) p *saved_cu $9 = XIL(0x6f04860091b9000) (gdb) xtype Lisp_Symbol (gdb) xsymbol $10 = (struct Lisp_Symbol *) 0xaa21360 Cannot access memory at address 0xaa21368 Since this is a 32-bit build, no Lisp object can have the high 24 bits non-zero, so 0x6f04860091b9000 cannot be a valid object. Another factoid that may be of interest is this. At the beginning of load_comp_unit we do: dynlib_handle_ptr handle = comp_u->handle; So: (gdb) p/x comp_u->handle $13 = 0x6a580000 Now, on Windows the "handle" returned by LoadLibrary is just the memory address where the library is loaded. However, "info shared" in GDB doesn't show _any_ .eln library loaded at that address. The closest one is this: From To Syms Read Shared Object Library 0x6a581000 0x6a5bacd8 Yes d:\usr\eli\.emacs.d\eln-cache\28.0.50-19fa14f1\cc-align-bb265728-bd3550a3.eln whose address is 4KB higher. That probably means the CU represented by comp_u was unloaded, right? But: (gdb) p comp_u->file $15 = XIL(0x80000000092db190) (gdb) xtype Lisp_String (gdb) xstring $16 = (struct Lisp_String *) 0x92db190 "d:/usr/eli/.emacs.d/eln-cache/28.0.50-19fa14f1/cc-align-bb265728-bd3550a3.eln" Surprise! it's the same .eln file as is now loaded 4KB higher. Anything else we could glean from that crashed Emacs session?