all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: alan@idiocy.org, jguenther@gmail.com,
	Andrii Kolomoiets <andreyk.mad@gmail.com>,
	38748@debbugs.gnu.org
Subject: bug#38748: 28.0.50; crash on MacOS 10.15.2
Date: Wed, 08 Jan 2020 18:39:42 +0100	[thread overview]
Message-ID: <m2blrdc0f5.fsf@gmail.com> (raw)
In-Reply-To: <834kxej6lc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Jan 2020 16:06:23 +0200")

>>>>> On Thu, 02 Jan 2020 16:06:23 +0200, Eli Zaretskii <eliz@gnu.org> said:

Iʼm now seeing this as well on both master and emacs-27

    Eli> This looks like some compiler bug, or maybe bug in GDB on your
    Eli> platform?  Because the source clearly says

    Eli>    Lisp_Object last_marked[LAST_MARKED_SIZE] EXTERNALLY_VISIBLE;

    Eli> so the type should be known to GDB.  But this is just an aside.

    >> But I found the commit after which error is occurs:
    >> b2949d39261e82c33572ba8a250298ef0b165b95
    >> 
    >> Commenting out that 'ok = false;' line make Emacs works without errors.

I can confirm this.

    Eli> I cannot explain how that change could cause any harm.  Here's the
    Eli> relevant code fragment:

    Eli>       if (CONSP (parent_face))
    Eli> 	{
    Eli> 	  Lisp_Object tail;
    Eli> 	  ok = false;
    Eli> 	  for (tail = parent_face; !NILP (tail); tail = XCDR (tail))
    Eli> 	    {
    Eli> 	      ok = get_lface_attributes (w, f, XCAR (tail), inherited_attrs,
    Eli> 					 false, named_merge_points);
    Eli> 	      if (!ok)
    Eli> 		break;
    Eli> 	      attr_val = face_inherited_attr (w, f, inherited_attrs, attr_idx,
    Eli> 					      named_merge_points);
    Eli> 	      if (!UNSPECIFIEDP (attr_val))
    Eli> 		break;
    Eli> 	    }
    Eli> 	  if (!ok)	/* bad face? */
    Eli> 	    break;  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Eli> 	}
    Eli>       else
    Eli> 	{
    Eli> 	  ok = get_lface_attributes (w, f, parent_face, inherited_attrs,
    Eli> 				     false, named_merge_points);
    Eli> 	  if (!ok)
    Eli> 	    break;
    Eli> 	  attr_val = inherited_attrs[attr_idx];
    Eli> 	}

    Eli> Since parent_face is a cons cell, then we enter the for-loop (since a
    Eli> cons cell cannot be nil), and then we immediately call
    Eli> get_lface_attributes whose return value overwrites the initial value
    Eli> of 'ok'.

    Eli> So how could the initial value of 'ok' matter here?  What am I
    Eli> missing?

    Eli> Can you run the unmodified code with a breakpoint on the line
    Eli> indicated by "<<<<<" above, and see if the breakpoint ever breaks?  If
    Eli> it does break, can you show the face being merged in this case?

It never breaks there for me.

    Eli> Also, if you build Emacs with exactly the same configure options, but
    Eli> without optimizations, does the problem persist?

Yes. Iʼll note that when this happens there are over 9000 stackframes,
so perhaps itʼs stack exhaustion. macOS has a default stack of 8192
kB, Iʼll see if increasing it helps.

Iʼm running under lldb as well, perhaps that will work better with
'last_marked'.

Robert





  reply	other threads:[~2020-01-08 17:39 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26  9:47 bug#38748: 28.0.50; crash on MacOS 10.15.2 Andrii Kolomoiets
2019-12-26 13:04 ` Alan Third
2019-12-26 17:18   ` Eli Zaretskii
2019-12-27 11:28     ` Andrii Kolomoiets
2019-12-27 14:14       ` Eli Zaretskii
2019-12-29 19:01         ` Andrii Kolomoiets
2019-12-29 19:31           ` Eli Zaretskii
2020-01-01 20:42             ` Andrii Kolomoiets
2020-01-02 14:06               ` Eli Zaretskii
2020-01-08 17:39                 ` Robert Pluim [this message]
2020-01-08 19:18                   ` Pip Cet
2020-01-08 19:58                     ` Eli Zaretskii
2020-01-08 20:39                       ` Pip Cet
2020-01-09  3:30                         ` Eli Zaretskii
2020-01-10  7:32                           ` Pip Cet
2020-01-10  8:27                             ` Eli Zaretskii
2020-01-10  8:58                               ` Robert Pluim
2020-01-10  9:21                                 ` Eli Zaretskii
2020-01-10 10:18                                   ` Robert Pluim
2020-01-11  6:26                                     ` Pankaj Jangid
2020-01-11  8:08                                       ` Eli Zaretskii
2020-01-11 10:43                                         ` Pankaj Jangid
2020-01-11 12:14                                           ` Eli Zaretskii
2020-01-10  9:22                               ` Pip Cet
2020-01-10  9:33                                 ` Eli Zaretskii
2020-01-11 13:59                                 ` Alan Third
2020-01-11 14:13                                   ` Pip Cet
2020-01-11 19:07                                     ` Alan Third
2020-01-08 21:43                     ` Robert Pluim
2020-01-08 22:18                       ` Pip Cet
2020-01-08 22:23                         ` Robert Pluim
2020-01-09  7:51                           ` Robert Pluim
2020-01-09 10:07                             ` Eli Zaretskii
2020-01-09 10:31                               ` Robert Pluim
2020-01-09 14:10                                 ` Pip Cet
2020-01-09 14:16                                 ` Eli Zaretskii
2020-01-09 14:56                                   ` Robert Pluim
2020-01-09 17:06                                     ` Eli Zaretskii
2020-01-09 13:51                               ` Andrii Kolomoiets
2020-01-09 14:13                                 ` Robert Pluim
2020-01-09 14:16                                 ` Pip Cet
2020-01-09 14:29                                   ` Andrii Kolomoiets
2020-01-09 15:15                                   ` Robert Pluim
2020-01-11 18:37                                     ` Pieter van Oostrum
2020-01-11 18:43                                       ` Eli Zaretskii
2020-01-11 21:23                                         ` Pieter van Oostrum
2020-01-12  3:33                                           ` Eli Zaretskii
2020-01-11 19:14                                       ` Pip Cet
2020-01-11 21:36                                         ` Pieter van Oostrum
2020-01-04 16:48               ` Pieter van Oostrum
2020-01-04 17:25                 ` Alan Third
2020-01-05 19:41                   ` Pieter van Oostrum

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=m2blrdc0f5.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=38748@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=andreyk.mad@gmail.com \
    --cc=eliz@gnu.org \
    --cc=jguenther@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 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.