On Jul 29 14:11, Petrovski, Roman wrote: > Hi, just ran into a problem which boils down to the following at least with Windows 7: > > char *p = (char*)malloc(0x80000000UL); //works fine, allocates memory as requested > memset(p, 0, 0x80000000UL); //Watch process segfault. > > The RtlFillMemory either crashes or underfills the buffer depending on the size given. > Looks like internally it treats size as a signed 4-byte integer. > > Please apply the patch below or implement an alternative. Thanks for the patch, but I'll rather be looking into an assembler alternative. I'm planning to pull in the NetBSD implementation, with the tweaks required for MS ABI. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat