[FIX: safe_eval’ing large strings gives illegal opcode.

* FIX: safe_eval’ing large strings gives illegal opcode.

* Update comment to be more explicit.
This commit is contained in:
jaredkipe
2017-10-03 17:51:24 +02:00
committed by xmo-odoo
parent 597ee1c581
commit bd7ee997c7
+1
View File
@@ -96,6 +96,7 @@ _SAFE_OPCODES = _EXPR_OPCODES.union(set(opmap[x] for x in [
'POP_BLOCK', 'POP_EXCEPT', # Seems to be a special-case of POP_BLOCK for P3
'SETUP_LOOP', 'BREAK_LOOP', 'CONTINUE_LOOP',
'MAKE_FUNCTION', 'CALL_FUNCTION',
'EXTENDED_ARG', # P3.6 for long jump offsets.
# P3: https://bugs.python.org/issue27213
'CALL_FUNCTION_EX',
# Already in P2 but apparently the first one is used more aggressively in P3