Closed dreynolds closed 10 years ago
I can do some things to shove the site of the overflow around, but I don't think the code as written will execute cleanly no matter what I do. The IPv6 CIDR range that you picked (fe80::/10) contains 2118 IP addresses (332,306,998,946,228,968,225,951,765,070,086,144). Casting this to a list is likely to run into internal limits on list length in the python interpreter. In the Cpython interpreter the maximum list length is ((size_t)-1)>>1). On a 32-bit system this is: ((232)-1)>>1) == ((231)-1) == 21,474,83,647. A 64-bit system raises the limit to ((264)-1)>>1) == ((263)-1) == 9,223,372,036,854,775,807. By extension, to perform this particular operation successfully you will need a system where size_t > 2119.
Yeh, I wondered later if it was a system limitation :( Feel free to "wontfix" it if you like
On 1 Mar 2014, at 17:09, Bryan Davis notifications@github.com wrote:
I can do some things to shove the site of the overflow around, but I don't think the code as written will execute cleanly no matter what I do. The IPv6 CIDR range that you picked (fe80::/10) contains 2118 IP addresses (332,306,998,946,228,968,225,951,765,070,086,144). Casting this to a list is likely to run into internal limits on list length in the python interpreter. In the Cpython interpreter the maximum list length is ((size_t)-1)>>1). On a 32-bit system this is: ((232)-1)>>1) == ((231)-1) == 21,474,83,647. A 64-bit system raises the limit to ((264)-1)>>1) == ((263)-1) == 9,223,372,036,854,775,807. By extension, to perform this particular operation successfully you will need a system where size_t > 2119.
— Reply to this email directly or view it on GitHub.
I was able to at least shove the problem out into the calling code.
Using one of the IPv6 addresses from your example:
Gives the following OverflowError: