delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/05/17:12:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Hannu E K Nevalainen" <garbage_collector AT telia DOT com>
To: "Blake Maltby" <Blakem AT CSL DOT COM>, <cygwin AT cygwin DOT com>
Subject: RE: Possible bug in stat, lstat with long filenames or paths
Date: Wed, 5 May 2004 23:11:05 +0200
Message-ID: <NGBBLLIAMFLGJEOAJCCEIEKHDKAA.garbage_collector@telia.com>
MIME-Version: 1.0
In-Reply-To: <634C934FA3C0D711916E0002B33DDD7801B1C7A4@gaea.csl.com>

$ uname -a
CYGWIN_NT-5.0 P450 1.5.10s(0.114/4/2) 20040420 11:21:06 i686 unknown unknown
Cygwin

This is: Win2K advanced server, SP4+all updates, cygwin w most (but no all)
recent updates and the 2004-04-20 snapshot dll.

$ cat stat.c
#include <string.h>
#include <stdio.h>
#include <sys/stat.h>

int main()
{
    char filename[1024];
    struct stat sb;

    strcpy(filename, "a");
    while(strlen(filename) < 1023)
    {
        strcat(filename, "a");
        printf("filename length %d\n", strlen(filename));

#ifdef DOSTAT
        stat(filename, &sb);
#endif

    }
    return 0;
}
$ gcc -DDOSTAT -o stat stat.c && stat >stat-run
$ gcc -o stat stat.c && stat >stat-chk
$ diff -u0 stat-*
$ ls -l stat-*
-rw-r--r--    1 Hannu       20358 May  5 21:36 stat-chk
-rw-r--r--    1 Hannu       20358 May  5 21:36 stat-run


Looks to me like you might have a fix in trying some of the snapshot dll's.
Test run on 8GB FAT32 and NTFS partitions, no diff.
<cygcheck output not checked>


/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E

** on a mailing list; please keep replies on that particular list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--


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

- Raw text -


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