Message368042
It can also crash.
ast.literal_eval('+0'*10**6)
The cause is that all AST handling C code (in particularly converting the AST from C to Python) is recursive, and therefore can overflow the C stack. Some recursive code has arbitrary limits which cause raising exceptions like MemoryError in the initial example, but not all code has such checks. |
|
| Date |
User |
Action |
Args |
| 2020-05-04 12:24:41 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, BTaskaya |
| 2020-05-04 12:24:41 | serhiy.storchaka | set | messageid: <1588595081.09.0.125278791941.issue39159@roundup.psfhosted.org> |
| 2020-05-04 12:24:41 | serhiy.storchaka | link | issue39159 messages |
| 2020-05-04 12:24:40 | serhiy.storchaka | create | |
|