public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Crash in g_file_monitor on 32-bit Cygwin
@ 2014-06-26  2:17 Ken Brown
  2014-06-27 17:11 ` Ken Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Ken Brown @ 2014-06-26  2:17 UTC (permalink / raw)
  To: cygwin

This is a followup to https://cygwin.com/ml/cygwin/2014-06/msg00324.html, from which I extracted the following test case:

$ cat gfile-test.c
#include <stdio.h>
#include <gio/gio.h>

void
gfile_add_watch (const char *file)
{
  GFile *gfile = g_file_new_for_path (file);
  GFileMonitor *monitor;
  GFileMonitorFlags gflags = G_FILE_MONITOR_NONE;
  monitor = g_file_monitor (gfile, gflags, NULL, NULL);
  if (! monitor)
    printf ("Can't watch file %s\n", file);
  else
    printf ("Watching file %s\n", file);
}

int
main ()
{
  const char *file = "gfile-test.c";
  gfile_add_watch (file);
}

$ gcc -g -O0 -o gfile-test $(pkg-config --cflags gio-2.0) gfile-test.c $(pkg-config --libs gio-2.0)

In the 64-bit case, this behaves as expected:

$ ./gfile-test.exe
Watching file gfile-test.c

In the 32-bit case, however, it crashes.  Running it under gdb shows that the call to g_file_monitor leads to a SEGV, but I can't tell exactly where; when I try to single step through the Glib code, I eventually hit an assertion violation in gdb.  strace shows lots of exceptions, but I can't make much sense out of it otherwise.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-10-16  1:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26  2:17 Crash in g_file_monitor on 32-bit Cygwin Ken Brown
2014-06-27 17:11 ` Ken Brown
2014-06-27 17:16   ` Ken Brown
2014-06-27 17:52   ` Yaakov Selkowitz
2014-06-28 11:08     ` Ken Brown
2014-10-14 16:27       ` Ken Brown
2014-10-14 18:30         ` Ken Brown
2014-10-14 19:28           ` Corinna Vinschen
2014-10-14 21:09             ` Yaakov Selkowitz
2014-10-15 16:46           ` Yaakov Selkowitz
2014-10-16  1:11             ` Ken Brown

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).