From 2eb44c995bfccabdfcd5957e7dc2b14f36c8d495 Mon Sep 17 00:00:00 2001 From: Harry-zklcdc <1269158832@qq.com> Date: Mon, 12 Jul 2021 11:51:14 +0800 Subject: [PATCH] [Fix] Runtime Error --- judge/languages.py | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/judge/languages.py b/judge/languages.py index 6987a3dc..16d7ceae 100644 --- a/judge/languages.py +++ b/judge/languages.py @@ -446,20 +446,15 @@ _pypy2_lang_config = { //APPEND BEGIN //APPEND END""", - "compile": { - "src_name": "solution.py", - "exe_name": "solution.py", - "max_cpu_time": 3000, - "max_real_time": 10000, - "max_memory": 256 * 1024 * 1024, - "compile_command": "/usr/bin/pypy -m py_compile {src_path}", - }, "run": { + "exe_name": "solution.py", "command": "/usr/bin/pypy {exe_path}", - "seccomp_rule": "general", - "env": default_env + "seccomp_rule": "", + "env": default_env, + "memory_limit_check_only": 1 } } + _pypy3_lang_config = { "template": """//PREPEND BEGIN //PREPEND END @@ -469,18 +464,12 @@ _pypy3_lang_config = { //APPEND BEGIN //APPEND END""", - "compile": { - "src_name": "solution.py", - "exe_name": "solution.py", - "max_cpu_time": 3000, - "max_real_time": 10000, - "max_memory": 256 * 1024 * 1024, - "compile_command": "/usr/bin/pypy3 -m py_compile {src_path}", - }, "run": { + "exe_name": "solution.py", "command": "/usr/bin/pypy3 {exe_path}", - "seccomp_rule": "general", - "env": default_env + ["PYTHONIOENCODING=utf-8"] + "seccomp_rule": "", + "env": default_env + ["PYTHONIOENCODING=utf-8"], + "memory_limit_check_only": 1 } }