Larry Hastings added the comment: I agree with the previous comment author. Can you post a sample program that crashes Python? Please specify what platform you're running on.
On 32-bit platforms, you'd be unable to construct even the first "r" * ((2**32)-1) string. That string would use 4GB of memory, and 32-bit platforms always reserve some virtual memory space for the OS. Even if you could construct the first one, you couldn't create the second one. mode would be NULL and the next line (which you didn't paste below) would notice the NULL and throw an exception. On 64-bit platforms, strlen() returns a 64-bit signed integer, and a string of length (2**32)-1 is no problem as long as you have enough memory. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27235> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com