unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@protonmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Eval EXEC <execvy@gmail.com>,
	gerd.moellmann@gmail.com, emacs-devel@gnu.org
Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland
Date: Fri, 06 Sep 2024 06:30:31 +0000	[thread overview]
Message-ID: <87frqdfg56.fsf@protonmail.com> (raw)
In-Reply-To: <86v7z91flo.fsf@gnu.org>

"Eli Zaretskii" <eliz@gnu.org> writes:

>> From: Eval EXEC <execvy@gmail.com>
>> Cc: pipcet@protonmail.com,  gerd.moellmann@gmail.com,  emacs-devel@gnu.org
>> Date: Fri, 06 Sep 2024 11:10:15 +0800
>>
>> Eval EXEC <execvy@gmail.com> writes:
>>
>> > I recompiled commit 95a30325a84 (HEAD -> scratch/igc, origin/scratch/igc)
>> > * src/igc.c (fix_frame): Correct the previous change.
>> >
>> > After testing, I believe the issue has been resolved.
>>
>> scratch/igc 95a30325 crash again:
>>
>> I use latest scratch/igc commit: * 95a30325a84 - (HEAD -> scratch/igc, origin/scratch/igc) * src/igc.c (fix_frame): Fix last change. (8 hours ago) <Eli Zaretskii>
>>
>> #5  igc_assert_fail (file=<optimized out>, line=<optimized out>, msg=<optimized out>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/igc.c:209
>
> It's an assertion violation, and it's too bad 'msg' is "optimized
> out", because it's valuable information.

I suspect it's this assertion in buffer.c:

Res BufferFill(Addr *pReturn, Buffer buffer, Size size)
{
  Res res;
  Pool pool;
  Addr base, limit, next;

  AVER(pReturn != NULL);
  AVERT(Buffer, buffer);
  AVER(size > 0); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  AVER(SizeIsAligned(size, BufferPool(buffer)->alignment));
  AVER(BufferIsReady(buffer));

This happens if we try to skip over an object that has been zeroed
(because it was freed or has moved): we report a size of zero to
amcSegFix(), and the assertion violation happens because it checks that
size is greater than zero.  Maybe it's possible to die sooner than that,
in the skip method itself.

> This is a different problem, I think.

I agree.

>   {
>     MPS_SCAN_BEGIN (ss)
>     {
>       mps_word_t *p = (mps_word_t *) pobj;
>       mps_word_t word = *p;
>
>       /* Quickly rule out Qnil, and prevent subtraxting from a
> 	 null pointer.  */
>       if (word == 0)
> 	return MPS_RES_OK;
>
>       mps_word_t tag = word & IGC_TAG_MASK;
>       if (tag == Lisp_Int0 || tag == Lisp_Int1)
> 	return MPS_RES_OK;
>       else if (tag == Lisp_Type_Unused0)
> 	emacs_abort ();
>
>       if (tag == Lisp_Symbol)
> 	{
> 	  ptrdiff_t off = word ^ tag;
> 	  mps_addr_t client = (mps_addr_t) ((char *) lispsym + off);
> 	  mps_addr_t base = client;
> 	  if (MPS_FIX1 (ss, base))
> 	    {
> 	      mps_res_t res = MPS_FIX2 (ss, &base); <<<<<<<<<<<<<<<<<<<
>
> I guess it would be interesting to see what was the cons and what was
> the symbol that was its car?

Something related to fonts, maybe?  Those use symbols which are
allocated dynamically and may have moved:


  for (i = 0; i < fontset->nfont; i++)
    {
      FcPattern *pat = fontset->fonts[i];
      FcChar8 *str;

      if (FcPatternGetString (pat, FC_FAMILY, 0, &str) == FcResultMatch)
	list = Fcons (intern ((char *) str), list);
    }

for example, in ftfont_list_family, builds such a list.

> Like this:
>
>   (gdb) frame 9
>   (gdb) p *pobj
>   (gdb) xtype
>   (gdb) xsymbol
>   (gdb) frame 10
>   (gdb) p *cons
>   (gdb) xcons
>   (gdb) p *xcons
>   (gdb) xcdr
>   (gdb) xtype

That information would be very interesting!

Pip




  reply	other threads:[~2024-09-06  6:30 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05  6:24 [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Eval EXEC
2024-09-05  7:14 ` Eval EXEC
2024-09-05  8:17   ` Eval EXEC
2024-09-05  7:21 ` Eval EXEC
2024-09-05  8:08 ` Eli Zaretskii
2024-09-05  8:14   ` Eval EXEC
2024-09-05 11:12   ` Pip Cet
2024-09-05  8:24 ` Helmut Eller
2024-09-05  8:28   ` Eval EXEC
2024-09-05  8:34     ` Helmut Eller
2024-09-05  8:37       ` Eval EXEC
2024-09-05 10:44       ` Eval EXEC
2024-09-05 11:01         ` Eli Zaretskii
2024-09-05 11:04           ` Eval EXEC
2024-09-05 11:09 ` Pip Cet
2024-09-05 11:15   ` Eval EXEC
2024-09-05 11:19     ` Pip Cet
2024-09-05 11:26       ` Eval EXEC
2024-09-05 16:04         ` Pip Cet
2024-09-05 16:32           ` Eval EXEC
2024-09-05 11:34       ` Eval EXEC
2024-09-05 11:49       ` Eval EXEC
2024-09-05 12:21         ` Eli Zaretskii
2024-09-05 13:20           ` Gerd Möllmann
2024-09-05 13:31             ` Eli Zaretskii
2024-09-05 13:37               ` Gerd Möllmann
2024-09-05 13:52                 ` Eli Zaretskii
2024-09-05 13:57                   ` Gerd Möllmann
2024-09-05 14:33                     ` Eli Zaretskii
2024-09-05 14:44                       ` Eli Zaretskii
2024-09-05 14:58                       ` Gerd Möllmann
2024-09-05 16:19                       ` Pip Cet
2024-09-05 16:40                         ` Eval EXEC
2024-09-05 16:45                         ` Eval EXEC
2024-09-05 16:57                         ` Eval EXEC
2024-09-05 16:59                           ` Eval EXEC
2024-09-05 17:03                           ` Pip Cet
2024-09-05 17:05                             ` Eval EXEC
2024-09-05 17:16                               ` Gerd Möllmann
2024-09-05 18:46                                 ` Eli Zaretskii
2024-09-05 19:24                                   ` Gerd Möllmann
2024-09-05 19:31                                     ` Eli Zaretskii
2024-09-05 18:48                               ` Eli Zaretskii
2024-09-05 18:56                                 ` Eval EXEC
2024-09-05 19:23                                   ` Eli Zaretskii
2024-09-05 19:31                                     ` Eli Zaretskii
2024-09-06  2:15                                     ` Eval EXEC
2024-09-06  3:10                                       ` Eval EXEC
2024-09-06  5:58                                         ` Pip Cet
2024-09-06  6:32                                           ` Eval EXEC
2024-09-06  7:41                                             ` Pip Cet
2024-09-06  8:28                                               ` Eval EXEC
2024-09-06 12:58                                                 ` Pip Cet
2024-09-06 13:14                                                   ` Eval EXEC
2024-09-06 10:57                                               ` Eli Zaretskii
2024-09-06 13:03                                                 ` Eval EXEC
2024-09-06 19:29                                             ` Pip Cet
2024-09-07  5:57                                               ` Eli Zaretskii
2024-09-07  9:05                                                 ` Pip Cet
2024-09-06  6:39                                           ` Eval EXEC
2024-09-06  7:43                                             ` Pip Cet
2024-09-07  7:46                                               ` Eval EXEC
2024-09-07  8:10                                                 ` Pip Cet
2024-09-07 13:20                                                   ` Gerd Möllmann
2024-09-06  6:05                                         ` Eli Zaretskii
2024-09-06  6:30                                           ` Pip Cet [this message]
2024-09-06  6:34                                           ` Eval EXEC
2024-09-06 11:49                                             ` Eli Zaretskii
2024-09-06 13:08                                               ` Eval EXEC
2024-09-05 19:01                                 ` Eval EXEC
2024-09-05 17:29                             ` Eval EXEC

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=87frqdfg56.fsf@protonmail.com \
    --to=pipcet@protonmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=execvy@gmail.com \
    --cc=gerd.moellmann@gmail.com \
    /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).