Skip to content

Commit

Permalink
Make links up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
int-y1 authored and Xyene committed Jun 9, 2024
1 parent 8bc8bf3 commit 3dd84a7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ Note that **the only Linux distribution with first-class support is the latest D

### Stable build

[![PyPI version](https://badge.fury.io/py/dmoj.svg)](https://pypi.python.org/pypi/dmoj)
[![PyPI](https://img.shields.io/pypi/pyversions/dmoj.svg)](https://pypi.python.org/pypi/dmoj)
[![PyPI version](https://badge.fury.io/py/dmoj.svg)](https://pypi.org/project/dmoj/)
[![PyPI](https://img.shields.io/pypi/pyversions/dmoj.svg)](https://pypi.org/project/dmoj/)

We periodically publish builds [on PyPI](https://pypi.python.org/pypi/dmoj). This is the easiest way to get started,
We periodically publish builds [on PyPI](https://pypi.org/project/dmoj/). This is the easiest way to get started,
but may not contain all the latest features and improvements.

```
Expand Down
4 changes: 2 additions & 2 deletions dmoj/cptbox/isolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def __init__(self, *, read_fs: List[FilesystemAccessRule], write_fs: List[Filesy
sys_sysctlbyname: ALLOW, # TODO: More strict?
sys_issetugid: ALLOW,
sys_rtprio_thread: ALLOW, # EPERMs when invalid anyway
sys_umtx_op: ALLOW, # http://fxr.watson.org/fxr/source/kern/kern_umtx.c?v=FREEBSD60#L720
sys_umtx_op: ALLOW, # http://fxr.watson.org/fxr/source/kern/kern_umtx.c?v=FREEBSD-6-0#L720
sys_getcontext: ALLOW,
sys_setcontext: ALLOW,
sys_pread: ALLOW,
Expand Down Expand Up @@ -390,7 +390,7 @@ def _access_check(self, debugger: Debugger, file: str, fs_jail: FilesystemPolicy

def handle_kill(self, debugger: Debugger) -> None:
# Allow tgkill to execute as long as the target thread group is the debugged process
# libstdc++ seems to use this to signal itself, see <https://github.com/DMOJ/judge/issues/18A3>
# libstdc++ seems to use this to signal itself, see <https://github.com/DMOJ/judge-server/issues/183>
target = debugger.uarg0
if target != debugger.pid:
raise DeniedSyscall(ACCESS_EPERM, f'Cannot kill other processes (target={target}, self={debugger.pid})')
Expand Down
2 changes: 1 addition & 1 deletion dmoj/cptbox/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _callback(self, syscall) -> bool:
def _protection_fault(self, syscall: int, is_update: bool) -> None:
# When signed, 0xFFFFFFFF is equal to -1, meaning that ptrace failed to read the syscall for some reason.
# We can't continue debugging as this could potentially be unsafe, so we should exit loudly.
# See <https://github.com/DMOJ/judge/issues/181> for more details.
# See <https://github.com/DMOJ/judge-server/issues/181> for more details.
if syscall == -1:
err = self._last_ptrace_errno
if err is None:
Expand Down
4 changes: 2 additions & 2 deletions dmoj/executors/SBCL.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# SBCL implements its own heap management, and relies on ASLR being disabled. So, on startup,
# it reads /proc/self/exe do determine if ASLR is disabled. If not, it forks, sets
# personality (http://man7.org/linux/man-pages/man2/personality.2.html) to disable ASLR,
# personality (https://man7.org/linux/man-pages/man2/personality.2.html) to disable ASLR,
# then execve's itself...
# As of https://github.com/DMOJ/judge/issues/277 we set personality ourselves to disable ASLR,
# As of https://github.com/DMOJ/judge-server/issues/277 we set personality ourselves to disable ASLR,
# so allowing (or blocking) the execve hack is not necessary: SBCL detects that ASLR is disabled,
# and proceeds to run.
class Executor(NullStdoutMixin, CompiledExecutor):
Expand Down
2 changes: 1 addition & 1 deletion dmoj/graders/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def check_result(self, case: TestCase, result: Result) -> CheckerOutput:
# If the submission didn't crash and didn't time out, there's a chance it might be AC
# We shouldn't run checkers if the submission is already known to be incorrect, because some checkers
# might be very computationally expensive.
# See https://github.com/DMOJ/judge/issues/170
# See https://github.com/DMOJ/judge-server/issues/170
checker = case.checker()
# checker is a `partial` object, NOT a `function` object
if not result.result_flag or getattr(checker.func, 'run_on_error', False):
Expand Down
2 changes: 1 addition & 1 deletion dmoj/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_feedback_str(cls, error: bytes, process: 'TracedPopen', binary: 'BaseExe
if not feedback and is_ir_or_rte:
if not process.was_initialized or (error and b'error while loading shared libraries' in error):
# Process may failed to initialize, resulting in a SIGKILL without any prior signals.
# See <https://github.com/DMOJ/judge/issues/179> for more details.
# See <https://github.com/DMOJ/judge-server/issues/179> for more details.
feedback = 'failed initializing'
elif process.signal:
feedback = strsignal(process.signal).lower()
Expand Down
2 changes: 1 addition & 1 deletion dmoj/utils/ansi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def strip_ansi(s: str) -> str:
# http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences
# https://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences
return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s)


Expand Down
2 changes: 1 addition & 1 deletion dmoj/utils/os_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def oom_score_adj(score: int, to: Optional[int] = None) -> None:
except ImportError: # before Python 3.8

def strsignal(signo: int) -> str:
# in large part from http://code.activestate.com/recipes/578899-strsignal/
# in large part from https://code.activestate.com/recipes/578899-strsignal/
libc = ctypes.CDLL(ctypes.util.find_library('c'))
strsignal_c = ctypes.CFUNCTYPE(ctypes.c_char_p, ctypes.c_int)(('strsignal', libc), ((1,),))
NSIG = signal.NSIG
Expand Down

0 comments on commit 3dd84a7

Please sign in to comment.