Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3BE8189E.E1E8BD5A@syntrex.com>
Date: Tue, 06 Nov 2001 18:06:38 +0100
From: Pavel Tsekov <ptsekov@syntrex.com>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: [PATCH proposal] Re: Setup use on win2k - a me too ...
References: <OE59HpQHyD1C0Ug8cpF00003953@hotmail.com> <1005045929.5221.0.camel@lifelesswks> <3BE7CA86.2EBAC42D@syntrex.com> <3BE7DFE6.E8062434@syntrex.com> <1005052267.2726.19.camel@lifelesswks> <20011106113645.B8509@redhat.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Christopher Faylor wrote:
> 
> On Wed, Nov 07, 2001 at 12:11:06AM +1100, Robert Collins wrote:
> >On Wed, 2001-11-07 at 00:04, Pavel Tsekov wrote:
> >> Btw what is done in state.cc is a bad habbit, IMO.
> >
> >Yes. It's C style, not CPP style.
> >
> >I'll approve this if you do a patch and Changelog.
> >
> >NULL for everything is correct - source should be 0, as should
> >net_method etc. the current code has checks for 0/NULL, but not for
> >random values :].
> >
> >And trust_level should be deleted if not used.
> 
> It is not a bad habit to rely on global variables being 0.  If they
> aren't then something is seriously wrong with either 'ld' or the
> run-time the loader.
> 
> The linux kernel developers have actually been removing explicit
> initialization to zero from most of their globals and statics.  I've
> been doing the same thing inside of the DLL.  It creates a smaller
> executable since the variables end up being assigned to the BSS segment
> which is allocated at run-time and is guaranteed to be zero.
> 
> I don't think that gratuitous changes like this are really called for
> unless you can *really* show that global variables are pointing to
> non-zero memory.  If that is the case then we need to figure out how
> that could possibly be the case.

I didn't know this actually, so I thought it may the cause for the
problem.
In fact I now remember that I red in the "Design & Implentation of 4.4
BSD" 
that when the zeroing of BSS was disabled at some stage of the
development
this caused a of lot problems with the available programs and this
feature was
thrown away. However the MSVC compiled programs do not have globals,
except
the static ones, initialized to zero and I was fooled by the fact.

I apologize for this.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

