This is the mail archive of the
mailing list for the Cygwin project.
Re: seg-vios from gcc program at execv() on Windows XP
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Richard Troy <rtroy at ScienceTools dot com>
- Cc: cygwin at cygwin dot com
- Date: Fri, 1 Oct 2004 10:30:32 -0400 (EDT)
- Subject: Re: seg-vios from gcc program at execv() on Windows XP
- References: <Pine.LNX.firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
On Thu, 30 Sep 2004, Richard Troy wrote:
> On Thu, 30 Sep 2004, Igor Pechtchanski wrote:
> > > Note that the code is _rock_solid_ on Linux/Unix/Mac OSX, and on all
> > > earlier versions of Windows we've ever tried it on. We've _never_ seen it
> > > seg-vio before.
> > Please provide a complete (hopefully simple) testcase, along with the
> > compilation flags, etc. In particular, it'd be interesting to see how
> > nargv is allocated, etc. I suspect you're not placing a NULL at the end
> > of the argument list, and Cygwin and Linux allocate nargv differently (so
> > that on Linux, nargv just happens to have zeroed memory after it).
> 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. I wasn't dismissing the possibility of a bug in Cygwin, simply
wanted to make sure that the code that exhibited the problem was correct.
I realize that you now have the issue fixed (or worked around), but if
you're still willing to pursue this to help Cygwin get better, please
check with SUS on the semantics of all the system calls used, and if you
can construct a testcase that should work correctly but doesn't, please
resubmit the bug report (with the complete testcase).
> I want to thank you for taking the time to reply, Igor. I was awfully
> stressed out about it.
Glad it helped.
> Even though it wasn't really a Cygwin problem, you were supportive and I
> appreciagte it.
We don't know yet that it wasn't. From your description of the "fix", it
seemed that your original code should have worked. That's why I asked for
> > > (BTW ping and dig utilities would be nice!)
> > FWIW, XP (and 2k)
This should have been "XP Pro" (and 2k)...
> > come with "`cygpath -S`/ping.exe" and "`cygpath -S`/nslookup.exe".
> ?? ...Doesn't do _anything_ on my computer! -smile-
> (Maybe I'd better to a hunt for them as they aren't in my path today.)
Those *are* the complete paths to the files -- just do "ls -l <path>" for
each of them. But if you have XP Home, you may not have them. :-(
|\ _,,,---,,_ email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ firstname.lastname@example.org
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html