Skip to content

Commit

Permalink
executors: allow clock_nanosleep in Python. clean up syscalls
Browse files Browse the repository at this point in the history
Python 3.11.1 use clock_nanosleep for time.sleep()
Ref: python/cpython#65501
  • Loading branch information
hieplpvip committed Jan 19, 2023
1 parent f7f6862 commit 3ac34d6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
3 changes: 0 additions & 3 deletions dmoj/executors/COFFEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ class Executor(ScriptExecutor):
syscalls = [
'capget',
'eventfd2',
'newselect',
'sched_yield',
'select',
'setrlimit',
'statx',
]
Expand Down
2 changes: 1 addition & 1 deletion dmoj/executors/GO.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Executor(CompiledExecutor):
data_grace = 98304 # Go uses data segment for heap arena map
address_grace = 786432
command = 'go'
syscalls = ['mincore', 'pselect6', 'mlock', 'setrlimit']
syscalls = ['mincore', 'mlock', 'setrlimit']
compiler_syscalls = ['setrlimit']
fs = [
# Go will start without THP information, but has some tuning for when
Expand Down
9 changes: 1 addition & 8 deletions dmoj/executors/SCRATCH.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ class Executor(ScriptExecutor):
command = 'scratch-run'
nproc = -1
address_grace = 1048576
syscalls = [
'eventfd2',
'epoll_create1',
'epoll_ctl',
'epoll_wait',
'epoll_pwait',
'statx',
]
syscalls = ['eventfd2', 'statx']
check_time = 10 # 10 seconds
check_memory = 262144 # 256MB of RAM
test_program = """\
Expand Down
1 change: 0 additions & 1 deletion dmoj/executors/java_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class JavaExecutor(SingleDigitVersionMixin, CompiledExecutor):
fsize = 1048576 # Allow 1 MB for writing crash log.
address_grace = 786432
syscalls = [
'pread64',
'clock_nanosleep',
'socketpair',
('procctl', handle_procctl),
Expand Down
1 change: 1 addition & 0 deletions dmoj/executors/python_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PythonExecutor(CompiledExecutor):
del sys.argv[0]
runpy.run_path(sys.argv[0], run_name='__main__')
"""
syscalls = ['clock_nanosleep']
address_grace = 131072
ext = 'py'

Expand Down

0 comments on commit 3ac34d6

Please sign in to comment.