delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/06/27/13:53:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=bseExgcc5jhw5SnBPNPIq5bCvtneDbMN+A0Yy7CHURf
dX5BzVyhbytUxWx/w3E7HHvoAzFLlz7r1uJ2c1Xl9+riSQjFrZaahUYX4bqmdgk4
VenlL2BKgogsQ+qw6/uzGyNb9lmTsenALgtEz2Ha3DzPp3hv09LzbSOnefyYtCZk
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=+O8JaaUH8qOo245KDlkAyA4JgSg=; b=aqzLpvlUHjg7itZf8
ho29rtD0bz5bnyyhLa79RLbQ7HZM0uIsUZawgG4uyLAJCMyoO+DiDsDfxMnUzJUb
Heii+v4dbi+BgpedOJBwcCDNnWpuzcVNckUuAZqZKsLmB5Grp3pu1bsmmC4vkARk
1gEdZ5e3kOlIPW3gaM2WWd14yE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qc0-f182.google.com
X-Received: by 10.224.60.137 with SMTP id p9mr36491247qah.70.1403891561881; Fri, 27 Jun 2014 10:52:41 -0700 (PDT)
Message-ID: <53ADAF68.2020703@cygwin.com>
Date: Fri, 27 Jun 2014 12:52:40 -0500
From: Yaakov Selkowitz <yselkowitz AT cygwin DOT com>
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 AT cygwin DOT com
Subject: Re: Crash in g_file_monitor on 32-bit Cygwin
References: <53AB82AB DOT 5000304 AT cornell DOT edu> <53ADA5B5 DOT 10404 AT cornell DOT edu>
In-Reply-To: <53ADA5B5.10404@cornell.edu>

On 2014-06-27 12:11, Ken Brown wrote:
> 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 <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.
>
> 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?

Sure.  Are you narrow this down to only one of glib or gamin?


Yaakov



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019