After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 731124 - g_resolver_lookup_service crashes on win32
g_resolver_lookup_service crashes on win32
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
2.28.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-06-02 19:02 UTC by Colin Leroy
Modified: 2017-09-02 07:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for 2.22 to 2.30 (919 bytes, patch)
2014-06-02 19:02 UTC, Colin Leroy
none Details | Review
Patch for 2.32 (476 bytes, patch)
2014-06-02 19:03 UTC, Colin Leroy
none Details | Review

Description Colin Leroy 2014-06-02 19:02:06 UTC
Created attachment 277760 [details] [review]
Patch for 2.22 to 2.30

Hello,

g_resolver_lookup_service() crashes on win32 if there is no reply to the SRV request :

Program received signal SIGTRAP, Trace/breakpoint trap.
0x773f56bd in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\Windows\system32\ntdll.dll
(gdb) bt
  • #0 ntdll!RtlpNtMakeTemporaryKey
    from C:\Windows\system32\ntdll.dll
  • #1 ntdll!EtwSetMark
    from C:\Windows\system32\ntdll.dll
  • #2 ntdll!RtlpNtMakeTemporaryKey
    from C:\Windows\system32\ntdll.dll
  • #3 ntdll!EtwSetMark
    from C:\Windows\system32\ntdll.dll
  • #4 wcsnicmp
    from C:\Windows\system32\ntdll.dll
  • #5 DnsLogIt
    from C:\Windows\system32\dnsapi.dll
  • #6 DnsLogIt
    from C:\Windows\system32\dnsapi.dll
  • #7 DnsApiAlloc
    from C:\Windows\system32\dnsapi.dll
  • #8 DnsFreeProxyName
    from C:\Windows\system32\dnsapi.dll
  • #9 libgio-2.0-0!g_threaded_resolver_get_type
    from C:\Program
  • #10 libgio-2.0-0!g_threaded_resolver_get_type
    from C:\Program
  • #11 libgio-2.0-0!g_threaded_resolver_get_type
    from C:\Program
  • #12 libgio-2.0-0!g_resolver_lookup_service
    from C:\Program
  • #13 claws-mail!auto_configure_service_sync

The crasher is present in glib 2.22.x to 2.32.x and fixed starting from 2.34.x.

It is due to a missing initialization of the DNS_RESULT * pointer, which doesn't get set to NULL by Microsoft's DnsQuery_A().

I know it is a bug in old versions, but I thought you may be interested as 
2.28.x is the version shipped at http://ftp.gnome.org/pub/gnome/binaries/win32/

Attached is the patch against 2.28.8, which applies for glib 2.22.x to glib 2.30.x; and a patch for glib 2.32.x where gwin32resolver.c is removed.
Comment 1 Colin Leroy 2014-06-02 19:03:09 UTC
Created attachment 277761 [details] [review]
Patch for 2.32
Comment 2 Daniel Boles 2017-09-02 07:03:02 UTC
Thanks for the patch, but as you can see, the binaries at the given link are not updated, and nor are such (now) old versions of GLib.

The recommended way to obtain binaries of GLib, GTK+, et al. now is to get them via MSYS2:
  https://www.gtk.org/download/windows.php