X-Spam-Check-By: sourceware.org Date: Wed, 12 Jul 2006 10:48:39 -0500 From: Brian Ford Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: 1.5.21s mmap error Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes 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 This is just a heads up for now as I plan to try and produce an STC with cygcheck output later today or tomorrow as time allows. But, just in case it rings any bells... CYGWIN_NT-5.1 PC1163-8460-XP 1.5.21s(0.156/4/2) 20060707 11:45:39 i686 unknown unknown Cygwin 17 [unknown (0xC08)] vital 3784 mmap_record::alloc_page_map: Warning: VirtualProtect (addr: 0x2E230000, len: 0x18000000, new_prot: 0x4, old_prot: 0x5321000), Win32 error 487 The application in question was trying to (code fragment): { int fd; #ifdef MAP_ANON fd = -1; #else /* ndef MAP_ANON */ #define MAP_ANON 0 fd = open("/dev/zero", O_RDONLY); if (fd < 0) { perror("open failed for /dev/zero"); return -1; } #endif /* ndef MAP_ANON */ #ifndef MAP_NORESERVE #ifdef MAP_AUTORESRV #define MAP_NORESERVE MAP_AUTORESRV #else #define MAP_NORESERVE 0 #endif #endif // addr = a hint address just after a previously mmaped system // chosen address // virtsize = 0x18000000 addr = mmap(addr, virt_size, (PROT_READ|PROT_WRITE), (MAP_NORESERVE|MAP_PRIVATE|MAP_ANON), fd, 0); if (addr == MAP_FAILED) { perror("mapping VM scratch space"); close(fd); return -1; } #ifndef MAP_ANON close(fd); #endif } To the application, the mmap call apeared to succeed, but when it tries to use the space, a SIGSEGV occurs. The same application works fine under Cygwin 1.5.18. Thanks. -- Brian Ford Lead Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... . -- 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/