Message174381
I have 12 GB of RAM. Let's test.
$ ./python
Python 3.4.0a0 (default:8573a86c11b5+, Oct 31 2012, 22:17:00)
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux
>>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**32 + b'}')
>>> len(x)
4294967318
>>> y=x.decode('unicode-escape')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError
There is no crash, but it would be better to get a SyntaxError("(unicode error) 'unicodeescape' codec can't decode bytes in position 0-6: unknown Unicode character name") instead.
I propose to only fix this issue in Python 3.4. |
|
Date |
User |
Action |
Args |
2012-10-31 22:08:32 | vstinner | set | recipients:
+ vstinner, lemburg, mark.dickinson, pitrou, benjamin.peterson, ezio.melotti, serhiy.storchaka |
2012-10-31 22:08:32 | vstinner | set | messageid: <1351721312.44.0.922371522929.issue16335@psf.upfronthosting.co.za> |
2012-10-31 22:08:32 | vstinner | link | issue16335 messages |
2012-10-31 22:08:32 | vstinner | create | |
|