From: Vitalie Spinu <spinuvit@gmail.com>
To: Alex Gramiak <agrambot@gmail.com>
Cc: 36019@debbugs.gnu.org
Subject: bug#36019: 27.0.50; Segfault in color_distance in emacs --batch
Date: Wed, 07 Aug 2019 08:57:15 +0200 [thread overview]
Message-ID: <8736idxy2c.fsf@gmail.com> (raw)
In-Reply-To: <877ea5keow.fsf@gmail.com> (Vitalie Spinu's message of "Sat, 01 Jun 2019 08:22:23 +0200")
Hi Alex,
The bug is still in the master. Would it be ok to push the fix?
Thanks,
Vitalie
>> On Sat, Jun 01 2019 08:22, Vitalie Spinu wrote:
> Hi Alex,
> You are right on spot.
> Before the crash:
> Initial: 1, hook: (nil)
> Your fix does help and the following is printed:
> Initial: 1, hook: 0x561a49f72240Initial: 1, hook: 0x561a49f72240Initial: 1,
> hook: 0x561a49f72240Initial: 1, hook: 0x561a49f72240Initial: 1, hook:
> 0x561a49f72240Initial: 1, hook: 0x561a49f72240Initial: 1, hook:
> 0x561a49f72240Initial: 1, hook: 0x561a49f72240Initial: 1, hook:
> 0x561a49f72240Initial: 1, hook: 0x561a49f72240
> Thanks for the quick resolution.
> Vitalie
>>> On Fri, May 31 2019 14:30, Alex Gramiak wrote:
>> Vitalie Spinu <spinuvit@gmail.com> writes:
>>> I have bisected it to:
>>>
>>> yes: 5d8b0fadee * | Add terminal hook query_frame_background_color
>>> err: 41e20ee4bc * | Add terminal hook defined_color_hook
>>> err: a411517faf * | Rename generic x_* identifiers
>>> err: da9541dd10 * | Add prefixes to some window system-dependent procedures
>>> no: ff4e31fa32 * | Rename generic x_* procedures in xdisp.c
>>>
>>> The commits marked with err: don't build. So should be one of the top 4 commits.
>>>
>>>
>>> Vitalie
>>>
>>>>> On Fri, May 31 2019 10:30, Vitalie Spinu wrote:
>>>
>>>> Hi,
>>>
>>>> One of my packages started segfaulting in tests after emacs 27 update. I cannot
>>>> reproduce it in an X session, nor make a simple reproducible example. Hopefully
>>>> the backtraces will be enough.
>>>
>>>> The issue appeared in the last 4-5 months. I can bisect if needed.
>> I can't reproduce this, but looking at the likely culprit (41e20ee4bc)
>> it's likely due to the frame being the initial frame. Just to make sure,
>> could you test with this simple primitive check for this?
>> diff --git a/src/xfaces.c b/src/xfaces.c
>> index d211ec8c46..10cfa50526 100644
>> --- a/src/xfaces.c
>> +++ b/src/xfaces.c
>> @@ -4207,6 +4207,11 @@ two lists of the form (RED GREEN BLUE) aforementioned. */)
>> struct frame *f = decode_live_frame (frame);
>> Emacs_Color cdef1, cdef2;
>> + fprintf (stderr,
>> + "Initial: %d, hook: %p",
>> + FRAME_INITIAL_P (f),
>> + FRAME_TERMINAL (f)->defined_color_hook);
>> +
>> if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
>> && !(STRINGP (color1)
>> && FRAME_TERMINAL (f)->defined_color_hook (f,
>> I expect that it will print "Initial: 1, hook: 0x0" before segfaulting.
>> If this is the case, then perhaps the initial frame should also have
>> this hook defined, though this would be the first such hook defined for
>> the initial frame type.
>> If this is correct, then the following diff should fix this:
>> diff --git a/src/terminal.c b/src/terminal.c
>> index 0ee0121e35..ed2cfead7a 100644
>> --- a/src/terminal.c
>> +++ b/src/terminal.c
>> @@ -624,6 +624,7 @@ init_initial_terminal (void)
>> initial_terminal->kboard = initial_kboard;
>> initial_terminal->delete_terminal_hook = &delete_initial_terminal;
>> initial_terminal->delete_frame_hook = &initial_free_frame_resources;
>> + initial_terminal->defined_color_hook = &tty_defined_color; /* xfaces.c */
>> /* Other hooks are NULL by default. */
>> return initial_terminal;
next prev parent reply other threads:[~2019-08-07 6:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 8:30 bug#36019: 27.0.50; Segfault in color_distance in emacs --batch Vitalie Spinu
2019-05-31 15:21 ` Vitalie Spinu
2019-05-31 20:30 ` Alex Gramiak
2019-06-01 6:22 ` Vitalie Spinu
2019-08-07 6:57 ` Vitalie Spinu [this message]
2019-08-07 14:29 ` Eli Zaretskii
2019-08-10 8:47 ` Eli Zaretskii
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=8736idxy2c.fsf@gmail.com \
--to=spinuvit@gmail.com \
--cc=36019@debbugs.gnu.org \
--cc=agrambot@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.