Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Subject: mmap bug on Windows 9x To: cygwin AT cygwin DOT com Date: Thu, 15 Jul 2004 22:06:15 +0200 (CEST) From: "Anton Ertl" Reply-To: anton AT mips DOT complang DOT tuwien DOT ac DOT at MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: On Windows 9x/ME different calls to mmap sometimes produce the same address (without that memory being unmapped in the meantime, at least not by application code). Here's a trace of the application calls to mmap (on WME): try mmap($0, $400038, ..., MAP_ANON, ...); success, address=$83950000 try mmap($83950000, $2cfd0, ..., MAP_FIXED|MAP_FILE, imagefile, 0); failed: Not enough core try mmap($83d52000, $400038, ..., MAP_ANON, ...); success, address=$83950000 try mmap($83d52000, $4000, ..., MAP_ANON, ...); success, address=$83d51000 try mmap($83d56000, $4000, ..., MAP_ANON, ...); success, address=$83d55000 try mmap($83d5a000, $3c00, ..., MAP_ANON, ...); success, address=$83d59000 try mmap($83d5e000, $3a00, ..., MAP_ANON, ...); success, address=$83466000 try mmap($8346b000, $40000, ..., MAP_ANON, ...); success, address=$83d60000 try mmap($83da1000, $40000, ..., MAP_ANON, ...); success, address=$83d60000 Note that the last two calls produce the same address. This happens with cygwin1.dll versions 1.5.5-1 and 1.5.10-3 (and probably also with 1.3.22-1). On Windows 2000 (with cygwin1.dll 1.3.22) the same application produces the following trace: try mmap($0, $400038, ..., MAP_ANON, ...); success, address=$650000 try mmap($650000, $2cfd0, ..., MAP_FIXED|MAP_FILE, imagefile, 0); failed: Value too large for defined data type try mmap($a52000, $400038, ..., MAP_ANON, ...); success, address=$a60000 try mmap($e62000, $4000, ..., MAP_ANON, ...); success, address=$a51000 try mmap($a56000, $4000, ..., MAP_ANON, ...); success, address=$a55000 try mmap($a5a000, $3c00, ..., MAP_ANON, ...); success, address=$a59000 try mmap($a5e000, $3a00, ..., MAP_ANON, ...); success, address=$e61000 try mmap($e66000, $40000, ..., MAP_ANON, ...); success, address=$e70000 try mmap($eb1000, $40000, ..., MAP_ANON, ...); success, address=$eb0000 and everything works fine. In this posting I just want to check if the bug is already known. If not, I will condense the application to something that exhibits the bug. Or, if you feel adventurous, you can deal with the full application: http://www.complang.tuwien.ac.at/forth/gforth/gforth-0.6.2.tar.gz (also available from GNU mirrors); you get the trace output above if you build gforth with gcc-3.3 and call it with --debug. Thanks for your work on Cygwin. - anton -- 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/