unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,  Emacs Devel <emacs-devel@gnu.org>
Subject: Re: MPS: hash tables / obarrays
Date: Mon, 20 May 2024 08:13:47 +0200	[thread overview]
Message-ID: <m2le45huxw.fsf@pro2.fritz.box> (raw)
In-Reply-To: <m2ttithzvl.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Mon, 20 May 2024 06:27:10 +0200")

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Helmut Eller <eller.helmut@gmail.com> writes:
>
>>> I'd say a reference we didn't scan :-(.
>>>
>>> The is_mps with a Lisp_Object doesn't work with symbols, BTW, because
>>> the Lisp_Object doesn't contain a pointer, but an offset from lispsym.
>>
>> The function that tries to print is comp--final and the argument is the
>> expr.  When I call safe_debug_print on that it goes on for many pages
>> and ends with this:
>>
>>    #2314# 635 #2194# 636 #2181# 637 #2022# 638 #1949# 639 #1891# 640 #1640#)) #s(comp-data-container nil #s(hash-table test
>>   igc.c:343: Emacs fatal error: assertion failed: h->obj_type != IGC_OBJ_FWD
>>
>>   Breakpoint 1, terminate_due_to_signal (sig=6, backtrace_limit=2147483647)
>>       at emacs.c:443
>>   443       signal (sig, SIG_DFL);
>>   The program being debugged stopped while in a function called from GDB.
>>   Evaluation of the expression containing the function
>>   (safe_debug_print) will be abandoned.
>>   When the function is done executing, GDB will silently stop.
>>   (gdb)
>>
>> So it could have something to do with hash tables after all.
>
> Could be, of course.
>
> Maybe you could try the following: In igc_check_fwd, where we find the
> header has IGC_OBJ_FWD,
>
>   void
>   igc_check_fwd (void *client)
>   {
>     if (is_mps (client))
>       {
>         struct igc_header *h = client_to_base (client);
>         igc_assert (h->obj_type != IGC_OBJ_FWD);
>       }
>   }
>
>   struct igc_fwd
>   {
>     struct igc_header header;
>     mps_addr_t new_base_addr;
>   };
>
> When h->obj_type == IGC_OBJ_FWD, then the header is actually an igc_fwd,
> and the new_base_addr points to where the object was forwarded to.
> dflt_fwd does that. Some phantasy debug commands woould look like
>
> (lldb) p *(struct igc_fwd *) h
> => ...new_base_addr = 0x1234
>
> (lldb) p *(struct igc_header *) 0x1234
> (lldb) p base_to_client ((void *) 0x1234)
>
> We could then perhaps, not always, see what the real object looks like.
> For example, if it is a symbol, its name etc. Maybe that gives us a
> clue.

Probably unrelated, but since we're talking native-comp... I've just
removed the special handling of comp units in the dump. This should be
unnecessary now that we traverse the dump, and it's actually against the
MPS rule that roots may not overlap...



  reply	other threads:[~2024-05-20  6:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19  8:38 MPS: hash tables / obarrays Gerd Möllmann
2024-05-19  8:57 ` Eli Zaretskii
2024-05-19  9:12   ` Gerd Möllmann
2024-05-19  9:50 ` Helmut Eller
2024-05-19 10:14   ` Gerd Möllmann
2024-05-19 10:30     ` Helmut Eller
2024-05-19 11:21       ` Gerd Möllmann
2024-05-19 20:36         ` Helmut Eller
2024-05-20  4:27           ` Gerd Möllmann
2024-05-20  6:13             ` Gerd Möllmann [this message]
2024-05-20  8:10             ` Helmut Eller
2024-05-20  8:43               ` Gerd Möllmann
2024-05-29 12:00 ` Helmut Eller
2024-05-29 13:30   ` Gerd Möllmann
2024-05-29 15:00     ` Helmut Eller
2024-05-29 16:28       ` Gerd Möllmann
2024-05-29 16:52         ` Andrea Corallo
2024-05-29 18:03           ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m2le45huxw.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).