www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/16/01:30:37

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Wed, 16 Jan 2002 08:24:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: Andrew Cottrell <acottrel AT ihug DOT com DOT au>,
DJGPP developers <djgpp-workers AT delorie DOT com>
Subject: Re: ls weirdness on root drive
In-Reply-To: <10201152300.AA20792@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1020116081912.2698H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 15 Jan 2002, Charles Sandmann wrote:

> So it appears that findfirst gets really confused on attributes with
> lfn on Win2k.

Is this conclusion confirmed by running just findfirst on that 
directory?  If you only see the weird behavior in stat, it could be 
something peculiar to lstat, not to findfirst.  stat examines the DOS 
attributes, and tries to detect volume lables, so it could err when the 
attributes include the volume-label bit (it happened in the past on NT).

> By the way, the env crash appears when it is doing a loop on the
> 3rd argument in the main(*) arg list, putenv()'ing all of those strings.
> Putenv calls free(environ) which is where it crashes (inside free).

Sounds like some memory-allocation bug, in which case it could well be 
unrelated to the place where you see the crash.

One possible way to nail this sucker is to write a short test program and 
link it with YAMD, then run it on plain DOS, so that uncommit function 
works.  With any luck, you should get a Page Fault where bad memory 
reference (the one which corrupts the malloc chain and causes the 
crashes you see) is made.

> I don't know why setting DJGPP would prevent the problem,

It changes the sequence of memory allocations.

- Raw text -


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