Mail Archives: cygwin/2006/07/12/11:48:48
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/
- Raw text -