From 5f86f784d789e0b614529b74d086b25e53577068 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Fri, 11 Oct 2019 12:29:16 -0400 Subject: [PATCH 1/3] SBCL: fix on Debian 10 --- dmoj/executors/SBCL.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dmoj/executors/SBCL.py b/dmoj/executors/SBCL.py index 997bf5f64..394ce575e 100644 --- a/dmoj/executors/SBCL.py +++ b/dmoj/executors/SBCL.py @@ -15,7 +15,8 @@ class Executor(NullStdoutMixin, ScriptDirectoryMixin, CompiledExecutor): command = 'sbcl' syscalls = ['personality', 'poll'] test_program = '(write-line (read-line))' - address_grace = 1048576 * 2 # *wipes brow* + address_grace = 262144 + data_grace = 262144 compile_script = '''(compile-file "{code}")''' @@ -23,7 +24,13 @@ def get_compile_args(self): return [self.get_command(), '--eval', self.compile_script.format(code=self._code), '--quit'] def get_cmdline(self): - return [self.get_command(), '--noinform', '--load', self.problem + ".fasl", '--quit', '--end-toplevel-options'] + return [self.get_command(), '--dynamic-space-size', str(int(self.__memory_limit / 1024.0 + 1)), + '--noinform', '--no-sysinit', '--no-userinit', '--load', self.problem + ".fasl", + '--quit', '--end-toplevel-options'] + + def launch(self, *args, **kwargs): + self.__memory_limit = kwargs['memory'] + return super().launch(*args, **kwargs) def get_executable(self): return self.get_command() From 8dc2cb14f0ccef342e7984c2331018c9290bbbf5 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Fri, 11 Oct 2019 12:29:45 -0400 Subject: [PATCH 2/3] travis: install sbcl --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 57116710d..954b6001b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ addons: - dart/stable - scala - racket + - sbcl matrix: include: - name: flake8 From 171b55cee385f1a0ee50b71e87de54ff3606715a Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Fri, 11 Oct 2019 12:30:11 -0400 Subject: [PATCH 3/3] travis: add SBCL to tested runtimes --- .travis.test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.test.py b/.travis.test.py index 7ab2e43db..948e0022f 100644 --- a/.travis.test.py +++ b/.travis.test.py @@ -8,7 +8,7 @@ 'F95', 'GO', 'GROOVY', 'HASK', 'JAVA8', 'OCAML', 'SCALA', 'MONOCS', 'MONOVB', 'PAS', 'PRO', 'GAS32', 'GAS64', 'LUA', 'NASM', 'NASM64', 'PERL', 'PHP', 'PY2', 'PY3', 'PYPY', 'PYPY3', 'RKT', - 'RUBY2', 'RUST', 'SCM', 'SED', 'SWIFT', 'TCL', 'TEXT'] + 'RUBY2', 'RUST', 'SCM', 'SED', 'SWIFT', 'SBCL', 'TCL', 'TEXT'] RVM_DIR = os.path.expanduser('~/.rvm/rubies/') PYENV_DIR = '/opt/python/'