From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28888 invoked by alias); 27 Jun 2014 17:11:17 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 28877 invoked by uid 89); 27 Jun 2014 17:11:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: limerock03.mail.cornell.edu Received: from limerock03.mail.cornell.edu (HELO limerock03.mail.cornell.edu) (128.84.12.34) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Jun 2014 17:11:15 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id s5RHBDQ9004265 for ; Fri, 27 Jun 2014 13:11:13 -0400 Received: from [192.168.1.3] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s5RHBBbP032650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 27 Jun 2014 13:11:12 -0400 Message-ID: <53ADA5B5.10404@cornell.edu> Date: Fri, 27 Jun 2014 17:11:00 -0000 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Crash in g_file_monitor on 32-bit Cygwin References: <53AB82AB.5000304@cornell.edu> In-Reply-To: <53AB82AB.5000304@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00426.txt.bz2 On 6/25/2014 10:17 PM, Ken Brown wrote: > 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 > #include > > 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. I rebuilt glib and gamin without optimization so that I could step through the code in gdb. But stepping through the code turned out to be unnecessary, because the bug was gone after the rebuilds. I don't know if optimization was really the issue or whether just rebuilding with the latest tools is what fixed it. My builds can be obtained from http://sanibeltranquility.com/cygwin/ if anyone else wants to try to reproduce this without rebuilding the packages themselves. Yaakov, could you take a look? 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