all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: eller.helmut@gmail.com,  acorallo@gnu.org,  emacs-devel@gnu.org
Subject: Re: MPS codegen
Date: Sun, 16 Jun 2024 10:19:20 +0200	[thread overview]
Message-ID: <m2h6dts3jr.fsf@pro2.fritz.box> (raw)
In-Reply-To: <86msnls4qo.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 16 Jun 2024 10:53:35 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  acorallo@gnu.org,  emacs-devel@gnu.org
>> Date: Sun, 16 Jun 2024 08:16:38 +0200
>> 
>> Gerd Möllmann <gerd.moellmann@gmail.com> 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?

I don't know, it makes no sense to me.

The only values the static struct contains is the type (Lisp_Fwd_Obj in
the example above, and the pointer to the variable we forward to
(&globals.f##vname in the example). I don't understand how these could
be not be right in the static struct if the dumper just left them alone.
I'd even assume that things would go haywire if the copy in the dump
didn't have the exact same values that the static struct has. Confusing.

@Helmut: forgot to mention that explicitly, but I think that might be
relevant to what you are planning to do...



  reply	other threads:[~2024-06-16  8:19 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 13:39 MPS: Update Gerd Möllmann
2024-06-10 16:17 ` Andrea Corallo
2024-06-10 16:26   ` Gerd Möllmann
2024-06-10 16:44     ` Gerd Möllmann
2024-06-10 20:58       ` Andrea Corallo
2024-06-11  3:12         ` Gerd Möllmann
2024-06-11 20:35 ` Helmut Eller
2024-06-12  4:45   ` Gerd Möllmann
2024-06-12  7:54     ` Eli Zaretskii
2024-06-12  8:00       ` Gerd Möllmann
2024-06-13  9:07         ` MPS codegen (was: MPS: Update) Helmut Eller
2024-06-13 12:33           ` MPS codegen Gerd Möllmann
2024-06-13 17:48             ` Helmut Eller
2024-06-13 18:24               ` Gerd Möllmann
2024-06-13 18:31                 ` Gerd Möllmann
2024-06-13 18:38                 ` Helmut Eller
2024-06-13 18:54                   ` Gerd Möllmann
2024-06-13 19:15                     ` Helmut Eller
2024-06-13 19:37                       ` Gerd Möllmann
2024-06-14  6:37                         ` Eli Zaretskii
2024-06-14  7:30                           ` Gerd Möllmann
2024-06-14  7:56                             ` Gerd Möllmann
2024-06-14 10:52                               ` Eli Zaretskii
2024-06-14 10:46                             ` Eli Zaretskii
2024-06-13 23:09                 ` Andrea Corallo
2024-06-14  6:08                   ` Gerd Möllmann
2024-06-14  7:45                     ` Helmut Eller
2024-06-14  7:59                       ` Gerd Möllmann
2024-06-14  8:28                         ` Gerd Möllmann
2024-06-14  8:51                           ` Helmut Eller
2024-06-14 11:32                             ` Eli Zaretskii
2024-06-14 12:43                               ` Gerd Möllmann
2024-06-14 13:04                                 ` Eli Zaretskii
2024-06-14 13:17                                   ` Gerd Möllmann
2024-06-14 13:46                                     ` Eli Zaretskii
2024-06-14 14:05                                       ` Gerd Möllmann
2024-06-14 14:33                                         ` Eli Zaretskii
2024-06-14 14:46                                           ` Gerd Möllmann
2024-06-14 16:30                               ` Helmut Eller
2024-06-14 18:28                                 ` Eli Zaretskii
2024-06-14 19:03                                   ` Eli Zaretskii
2024-06-14 19:26                                     ` Helmut Eller
2024-06-14 19:50                                       ` Gerd Möllmann
2024-06-15  6:26                                         ` Eli Zaretskii
2024-06-15  7:10                                           ` Gerd Möllmann
2024-06-15  7:34                                             ` Eli Zaretskii
2024-06-15  8:22                                               ` Gerd Möllmann
2024-06-15  6:11                                       ` Eli Zaretskii
2024-06-15  7:25                                         ` Gerd Möllmann
2024-06-15  7:46                                           ` Eli Zaretskii
2024-06-15  8:14                                             ` Gerd Möllmann
2024-06-15  8:38                                               ` Gerd Möllmann
2024-06-15  8:44                                                 ` Helmut Eller
2024-06-15  8:56                                                   ` Gerd Möllmann
2024-06-15  9:07                                                     ` Helmut Eller
2024-06-15  9:27                                                       ` Gerd Möllmann
2024-06-15 12:33                                                     ` Gerd Möllmann
2024-06-16  6:16                                                       ` Gerd Möllmann
2024-06-16  7:53                                                         ` Eli Zaretskii
2024-06-16  8:19                                                           ` Gerd Möllmann [this message]
2024-06-16  8:40                                                             ` Helmut Eller
2024-06-16  8:49                                                               ` Gerd Möllmann

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2h6dts3jr.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=acorallo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.