www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/10/18:52:59

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <41BA36B4.5010704@kleckner.net>
Date: Fri, 10 Dec 2004 15:52:20 -0800
From: Jim Kleckner <jek-cygwin1 AT kleckner DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin-gcc-fopen bug?
References: <20041210233633 DOT GA5428 AT ingber DOT com>
In-Reply-To: <20041210233633.GA5428@ingber.com>
X-IsSubscribed: yes

Lester Ingber wrote:

> Jim:
> 
> Hi.   On Solaris9 I use leak and there are no leaks, and I see no errors
> at all.

Valgrind implements an x86 interpreter and, among other things,
checks use of uninitialized memory or referencing outside of
allocated memory.  Dave's conjecture was that the problem was
of that type, I think, rather than a leak.

> One of the errors on Cywin, using the most Current Cygwin1.dll occurs
> before any memory is created, ner the top of main():
>   if ((Portfolio->ptr_err = fopen (infoFile, "a")) == NULL) {
>      ...

I believe you are using some C++ which may do lots
of things in static constructors called before main().

> Now, I do have a large set of structs (mostly full of pointers for
> memory to be created later in the program), e.g., several enum's with
> about 40 entries, and several nested structs with about 225 entries,
> in an include file common to about 50 .c files.  Could this be too
> many for the Cygwin gcc default?
> 
> BTW, it is "NULL" that mangles the filename, not "NUL", likely
> because I'm using sprintf() to string together paths and files.

Seems unlikely to be a capacity limit, but I'm not expert
in that area.  But a complex structure like that is just
the sort of thing that is likely to have an initialization
bug of some sort.

Your original post mentioned that your code would work with
-mno-cygwin.  If it will no longer work that way, it is
indicative that the problem is not a result of the cygwin
runtime...

Jim

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

- Raw text -


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