This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RtlFillMemory fails on block sizes over 0x7fffffff


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

Attachment: pgpiv87Yso8Ud.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]