Cygwin64: allocating too much memory causes a crash (corrected)

Ryan Johnson ryan.johnson@cs.utoronto.ca
Tue Oct 15 13:53:00 GMT 2013


On 15/10/2013 4:18 AM, Corinna Vinschen wrote:
> On Sep 10 18:02, Bengt Larsson wrote:
>> (I'm sorry I attached the wrong file. This should be right.)
>>>> On Cygwin64, if I malloc too much memory I get a stackdump, instead of a
>> NULL in return (for example testmalloc 5000000000).
> Sorry for the late reply, I was abroad for a couple of weeks.
>> I just tried it myself and could easily reproduce the problem.
> I found the culprit in mmap. It was using DWORD instead of size_t
> for a variable which was used for rounding purposes.
You know, this might be only the second 32->64 migration hiccup I've 
seen since the dust settled (the other being in gettimeofday or some such).
That's really impressive, given the number of places in the code where a 
DWORD (or other 32-bit value) could make things go really wrong...
Ryan
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /