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.devel Subject: Re: MPS codegen Date: Sun, 16 Jun 2024 10:53:35 +0300 Message-ID: <86msnls4qo.fsf@gnu.org> References: <878qz8ezn4.fsf@gmail.com> <8734pfgb51.fsf@gmail.com> <86ikybyd2h.fsf@gnu.org> <87v82bebc6.fsf@gmail.com> <86wmmrwf86.fsf@gnu.org> <86r0czwdmc.fsf@gnu.org> <87jzire36a.fsf@gmail.com> <86plsiwxag.fsf@gnu.org> <868qz6wsvq.fsf@gnu.org> <878qz6egtb.fsf@gmail.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="40613"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, acorallo@gnu.org, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 16 09:54:28 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sIkia-000AMi-Kf for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Jun 2024 09:54:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIkhp-0003xg-4b; Sun, 16 Jun 2024 03:53:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIkhn-0003xI-6X for emacs-devel@gnu.org; Sun, 16 Jun 2024 03:53:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIkhm-0003Ew-TI; Sun, 16 Jun 2024 03:53:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/5YSCmmlu+q5O0t5qEOH1veVAp3tszp+sPDv8tpAb1U=; b=Gi+xdjp1ByeKyh0V1VVn p8Q/gTIDmvxeahpnZW4d2jsHrBY4FIN9MPBiRa3iMayBgtOOYdQrd4sRbWGp7qXXXIIhDK6ncQSSv G8pRelK5eZdRgv3jZjf54Vo6OJKmwZEIS5/S4xcWi789QSbYuRU4+7LMBDt/kZuhqLBUBAqhWBfK3 DpDt7+Ojxsv07UJzaKci5rKpfbXK2Wqtdh5Um9Ke5wTtcYRKTs22YHcOaeTir2xXzuPNVi0C4x0Hd Icg7LCTpIXxiZg//2RU84bqTCIaVdaadS8+WCcU9DYEXXEEKNw21e2d1Ll9SuzCoF/Kbh+5zrZcGJ 9yeT70ZbRBCR0Q==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Sun, 16 Jun 2024 08:16:38 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320181 Archived-At: > From: Gerd Möllmann > Cc: Eli Zaretskii , acorallo@gnu.org, emacs-devel@gnu.org > Date: Sun, 16 Jun 2024 08:16:38 +0200 > > Gerd Möllmann writes: > > > pdumper.c:4937: Emacs fatal error: assertion failed: rc == 0 > > gmake[3]: *** [Makefile:335: emacs-lisp/byte-opt.elc] Abort trap: 6 > > gmake[3]: *** Waiting for unfinished jobs.... > > > > which is soothing. > > > > I'm reluctant to invest more time though because this all si obsolete > > with your change. > > Just had an inspiration what it might be, and it is indeed the case: > > Forwarded symbols are created like this > > #define DEFVAR_LISP_NOPRO(lname, vname, doc) \ > do { \ > static struct Lisp_Objfwd const o_fwd \ > = {Lisp_Fwd_Obj, &globals.f_##vname}; \ > defvar_lisp_nopro (&o_fwd, lname); \ > } while (false) > > The pdumper copies these static structs to the dump, and when the dump > is loaded, the symbol's forwarding pointer is changed from pointing to > the static struct to the copy to the dump. Both have the same contents. > > IOW, the static structs are no longer used. Consequenlty, when accessing > the structs to get their type (XFWDTYPE) we are accessing something in > the dump. > > Why pdumper is doing that escapes me ATM. Because the values recorded during dumping could be different from the default values, and so using the static struct might be wrong?