all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yamaoka@jpl.org, 35204@debbugs.gnu.org
Subject: bug#35204: 27.0.50; Crash on Cygwin
Date: Sat, 13 Apr 2019 23:26:13 +0100	[thread overview]
Message-ID: <87r2a5fsoq.fsf@tcd.ie> (raw)
In-Reply-To: <831s27mezn.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Apr 2019 18:15:40 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Ken Brown <kbrown@cornell.edu>
>> CC: "35204@debbugs.gnu.org" <35204@debbugs.gnu.org>
>> Date: Fri, 12 Apr 2019 14:54:21 +0000
>> 
>> I can replicate the crash on my system, but reverting only a tiny part of the 
>> commits in question seems to fix it, in the sense that I can successfully 
>> evaluate x-display-monitor-attributes-list:
>> 
>> diff --git a/src/xfns.c b/src/xfns.c
>> index 13f66f0718..3e4d037716 100644
>> --- a/src/xfns.c
>> +++ b/src/xfns.c
>> @@ -5030,7 +5030,7 @@ Internal use only, use `display-monitor-attributes-list' 
>> instead.  */)
>>         mi->mm_height = height_mm;
>> 
>>   #if GTK_CHECK_VERSION (3, 22, 0)
>> -      mi->name = xstrdup (gdk_monitor_get_model (monitor));
>> +      mi->name = g_strdup (gdk_monitor_get_model (monitor));
>>   #elif GTK_CHECK_VERSION (2, 14, 0)
>>         mi->name = gdk_screen_get_monitor_plug_name (gscreen, i);
>>   #endif
>> 
>> I don't know enough about GTK to know why this fixes it or why no one else has 
>> reported the problem.  It's hard to see why this would be specific to Cygwin.
>
> We release storage of mi->name (in free_monitors) by calling xfree, so
> I'm surprised g_strdup is right here, as that is documented to need
> g_free instead.  I wonder what am I missing.

I think the missing clue is in bug#35259: gdk_monitor_get_model may
return NULL, which g_strdup gladly accepts, but xstrdup does not.

https://debbugs.gnu.org/35259

-- 
Basil





  reply	other threads:[~2019-04-13 22:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09  8:07 bug#35204: 27.0.50; Crash on Cygwin Katsumi Yamaoka
2019-04-09  9:47 ` Eli Zaretskii
2019-04-10  4:54   ` Katsumi Yamaoka
2019-04-10 14:37     ` Eli Zaretskii
2019-04-11  2:31       ` Katsumi Yamaoka
2019-04-11 13:19         ` Eli Zaretskii
2019-04-11 23:02           ` Katsumi Yamaoka
2019-04-12  1:01             ` Katsumi Yamaoka
2019-04-12  7:11             ` Eli Zaretskii
2019-04-12  8:00               ` Katsumi Yamaoka
2019-04-12 14:54               ` Ken Brown
2019-04-12 15:15                 ` Eli Zaretskii
2019-04-13 22:26                   ` Basil L. Contovounesios [this message]
2019-04-13 22:50                     ` Alex Gramiak
2019-04-14  2:15                       ` Ken Brown
2019-04-14 23:26                         ` Katsumi Yamaoka

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=87r2a5fsoq.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=35204@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=yamaoka@jpl.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.