From bd7ee997c7ea53e23440e8ea480d4e0491463029 Mon Sep 17 00:00:00 2001 From: jaredkipe Date: Tue, 3 Oct 2017 17:51:24 +0200 Subject: [PATCH] =?UTF-8?q?[FIX:=20safe=5Feval=E2=80=99ing=20large=20strin?= =?UTF-8?q?gs=20gives=20illegal=20opcode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * FIX: safe_eval’ing large strings gives illegal opcode. * Update comment to be more explicit. --- odoo/tools/safe_eval.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py index fec89fac087..7f5d6e35e71 100644 --- a/odoo/tools/safe_eval.py +++ b/odoo/tools/safe_eval.py @@ -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