From d4d46af50d7ea61a60da0823000313720e0b5b8c Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Thu, 22 Feb 2024 21:35:03 +0100 Subject: [PATCH] Disable core dumps while building executables. Also spell out `--no-core` in all other invocations to make it more clear. --- judge/build_executable.sh | 2 +- judge/compile.sh | 2 +- judge/testcase_run.sh | 2 +- judge/version_check.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/judge/build_executable.sh b/judge/build_executable.sh index d5f77684c3..437b017684 100755 --- a/judge/build_executable.sh +++ b/judge/build_executable.sh @@ -76,7 +76,7 @@ logmsg $LOG_INFO "starting build" exitcode=0 $GAINROOT "$RUNGUARD" ${DEBUG:+-v} -u "$RUNUSER" -g "$RUNGROUP" \ - -r "$CHROOTDIR" -d '/build' -- \ + -r "$CHROOTDIR" -d '/build' --no-core -- \ './build' > 'build.log' 2>&1 || \ exitcode=$? diff --git a/judge/compile.sh b/judge/compile.sh index 7b2b005318..8d6eccc222 100755 --- a/judge/compile.sh +++ b/judge/compile.sh @@ -150,7 +150,7 @@ fi exitcode=0 $GAINROOT "$RUNGUARD" ${DEBUG:+-v} $CPUSET_OPT -u "$RUNUSER" -g "$RUNGROUP" \ -r "$PWD/.." -d "/compile" \ - -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT -c -f $SCRIPTFILELIMIT -s $SCRIPTFILELIMIT \ + -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT --no-core -f $SCRIPTFILELIMIT -s $SCRIPTFILELIMIT \ -M "$WORKDIR/compile.meta" $ENVIRONMENT_VARS -- \ "/compile-script/$(basename "$COMPILE_SCRIPT")" program "$MEMLIMIT" "$@" >"$WORKDIR/compile.tmp" 2>&1 || \ exitcode=$? diff --git a/judge/testcase_run.sh b/judge/testcase_run.sh index f37b984396..0f83e1f7ec 100755 --- a/judge/testcase_run.sh +++ b/judge/testcase_run.sh @@ -229,7 +229,7 @@ if [ $COMBINED_RUN_COMPARE -eq 0 ]; then chmod a+w feedback runcheck $GAINROOT "$RUNGUARD" ${DEBUG:+-v} $CPUSET_OPT -u "$RUNUSER" -g "$RUNGROUP" \ - -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT -c \ + -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT --no-core \ -f $SCRIPTFILELIMIT -s $SCRIPTFILELIMIT -M compare.meta -- \ "$COMPARE_SCRIPT" testdata.in testdata.out feedback/ $COMPARE_ARGS < program.out \ >compare.tmp 2>&1 diff --git a/judge/version_check.sh b/judge/version_check.sh index 8d7129161e..9fbc3fb1a3 100755 --- a/judge/version_check.sh +++ b/judge/version_check.sh @@ -80,7 +80,7 @@ fi exitcode=0 $GAINROOT "$RUNGUARD" ${DEBUG:+-v} $CPUSET_OPT -u "$RUNUSER" -g "$RUNGROUP" \ -r "$PWD/.." -d "/version_check" \ - -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT -c -f $SCRIPTFILELIMIT -s $SCRIPTFILELIMIT \ + -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT --no-core -f $SCRIPTFILELIMIT -s $SCRIPTFILELIMIT \ -M "$WORKDIR/version_check.meta" $ENVIRONMENT_VARS -- \ "/version_check-script/$(basename $VERSION_CHECK_SCRIPT)" >"$WORKDIR/version_check.tmp" 2>&1 || \ exitcode=$?