Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Dave Korn" <dk@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: seg-vios from gcc program at execv() on Windows XP
Date: Fri, 1 Oct 2004 15:36:25 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
In-Reply-To: <Pine.GSO.4.61.0410011022530.16917@slinky.cs.nyu.edu>
Message-ID: <NUTMEGqsJZW2NQ7eAnd000001f7@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 01 Oct 2004 14:36:25.0548 (UTC) FILETIME=[078F58C0:01C4A7C4]

> -----Original Message-----
> From: cygwin-owner On Behalf Of Igor Pechtchanski
> Sent: 01 October 2004 15:31

> > Almost; right issue, wrong problem. It turned out not that 
> there wasn't a
> > terminating NULL but that there was an extra one, one past where it
> > should have been! This kind of problem is, apparently, 
> _very_ easy to
> > overlook and I guess we just got away with it in the past. -shrug-
> 
> Hmm, an extra NULL shouldn't have any effect -- execv stops 
> at the first one, IIRC.  

  Yes, but if you've created an argv[] on the stack to pass to execv, and it has
just the right number of entries, and you go and write an extra NULL into
it................  

  IOW, the extra NULL does have an effect... just not on execv!


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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

