delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | smtp3.ihug.com.au: Host p107-tnt4.syd.ihug.com.au [203.173.134.107] claimed to be acceleron |
Message-ID: | <00cb01c11ccc$ef2fadf0$0a02a8c0@acceleron> |
From: | "Andrew Cottrell" <acottrel AT ihug DOT com DOT au> |
To: | "Mark E." <snowball3 AT bigfoot DOT com>, <djgpp-workers AT delorie DOT com> |
Cc: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>, |
"Charles Sandmann" <sandmann AT clio DOT rice DOT edu> | |
Subject: | Bash 2.05 buffer overrun problem |
Date: | Sat, 4 Aug 2001 20:05:03 +1000 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 5.50.4522.1200 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
Reply-To: | djgpp-workers AT delorie DOT com |
Mark, I have found a problem in dospath.c where the path_buffer is not big enough on my Windows 2000 box, Works fine on Win98. The problem is that on Windows 2000 with a long long path set the buffer gets overwriten and splats the init_cwd pointer which in turn causes a crash when exiting Bash. I do not know how long the path variable can be on Windows NT/2000/XP, but it appears to be allot larger that on Win9x. The Bash source I am using was downloaded on the 23-July-2001, I need to re-freash this with teh 30-July2001 source that I just spotted on your web page. I will download this and see if any other problems arrise tomorrow with my testing on Windows 2000. Patch environment (actual path is 379 chars) PATH=D:\dj204\BIN;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\bin;C :\Pr ogram Files\GNU\WinCvs 1.3\;C:\PROGRAM FILES\Tcl\bin;C:\Program Files\Perforce;C :\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Micr osoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\ Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin; The quick workarround I have done in the source that I am using is to add another buffer after the path_buffer. static char path_buffer[256]; static char overrun_buffer[4096]; /* path_buffer is to small */ static char *init_cwd; One quirk I spotted when building bash on the Windows 2000 box is that it requires a version of bash, but as the version I built on Win98 crashes I couldn't build it. Eli & Mark & Charles, Windows 2000 info: In earlier versions of Bash the problem with the FAT32 bit in the file I/O would cause problems on Windows 2000 which are not present in 2.0.5 as it now uses the file I/O functions in LIBC instead of it's own. The problem above would also cause problems on Windows 2000. Keep this in mind with regards to DJGPP apps working on Windows 2000. Andrew
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |