RtlFillMemory fails on block sizes over 0x7fffffff
Wed Jul 29 16:21:00 GMT 2015
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.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin-patches