Mail Archives: djgpp-workers/2002/01/16/01:30:37
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 -