WangChen <wang...@163.com> wrote on 10/11/2014 11:14:48 PM:
>
> I found a bug in HashMap.x10 but i can’t report in Jira since i
> don’t have an account.
>
> It’s in HashMap’s constructor:
>
> public def this(var sz:Long) {
> var pow2:Long = MIN_SIZE;
> while(pow2<sz)
> pow2 <<= 1n;
> init(pow2);
> }
>
> If i call this constructor with a size range from 2^62 ~  2^63-1
> pow2 will never be greater than sz so the loop will never end.
>

Thanks for the bug report.

I agree the program should raise an exception instead of hanging in an
infinite loop.  It seems plausible to raise an OutOfMemoryError before
entering the loop because attempting to allocate a Rail of size 2^62 will
certainly fail with an OutOfMemoryError.

--dave
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to