mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 14:18:40 +00:00
fix(judger): support Java updated to 8u222 and 11.0.4
Allow reading cpu,cpuacct and new syscall requirement.
This commit is contained in:
parent
a74f687824
commit
8ca70fc87c
@ -370,17 +370,16 @@ void init_conf(const RunProgramConfig &config) {
|
||||
|
||||
readable_file_name_set.insert("/usr/bin/python3");
|
||||
readable_file_name_set.insert("/usr/lib/python3/");
|
||||
# ifndef UOJ_JUDGER_PYTHON3_VERSION
|
||||
readable_file_name_set.insert("/usr/bin/python3.4");
|
||||
readable_file_name_set.insert("/usr/lib/python3.4/");
|
||||
readable_file_name_set.insert("/usr/bin/lib/python3.4/");
|
||||
readable_file_name_set.insert("/usr/local/lib/python3.4/");
|
||||
# endif
|
||||
# ifdef UOJ_JUDGER_PYTHON3_VERSION
|
||||
readable_file_name_set.insert("/usr/bin/python" UOJ_JUDGER_PYTHON3_VERSION);
|
||||
readable_file_name_set.insert("/usr/lib/python" UOJ_JUDGER_PYTHON3_VERSION "/");
|
||||
readable_file_name_set.insert("/usr/bin/lib/python" UOJ_JUDGER_PYTHON3_VERSION "/");
|
||||
readable_file_name_set.insert("/usr/local/lib/python" UOJ_JUDGER_PYTHON3_VERSION "/");
|
||||
# else
|
||||
readable_file_name_set.insert("/usr/bin/python3.4");
|
||||
readable_file_name_set.insert("/usr/lib/python3.4/");
|
||||
readable_file_name_set.insert("/usr/bin/lib/python3.4/");
|
||||
readable_file_name_set.insert("/usr/local/lib/python3.4/");
|
||||
# endif
|
||||
readable_file_name_set.insert("/usr/bin/pyvenv.cfg");
|
||||
readable_file_name_set.insert("/usr/pyvenv.cfg");
|
||||
@ -423,6 +422,7 @@ void init_conf(const RunProgramConfig &config) {
|
||||
syscall_max_cnt[__NR_sysinfo ] = -1;
|
||||
syscall_max_cnt[__NR_clone ] = -1;
|
||||
syscall_max_cnt[__NR_set_robust_list] = -1;
|
||||
syscall_max_cnt[__NR_prctl ] = -1;
|
||||
# endif
|
||||
|
||||
syscall_should_soft_ban[__NR_socket ] = true;
|
||||
@ -438,6 +438,7 @@ void init_conf(const RunProgramConfig &config) {
|
||||
readable_file_name_set.insert("/proc/");
|
||||
# ifdef UOJ_JUDGER_BASESYSTEM_UBUNTU1804
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/cpu/");
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/cpu,cpuacct/");
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/memory/");
|
||||
readable_file_name_set.insert("/usr/lib/locale/");
|
||||
# endif
|
||||
@ -488,6 +489,7 @@ void init_conf(const RunProgramConfig &config) {
|
||||
readable_file_name_set.insert("/proc/");
|
||||
# ifdef UOJ_JUDGER_BASESYSTEM_UBUNTU1804
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/cpu/");
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/cpu,cpuacct/");
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/memory/");
|
||||
readable_file_name_set.insert("/usr/share/java/");
|
||||
readable_file_name_set.insert("/usr/lib/locale/");
|
||||
@ -558,6 +560,7 @@ void init_conf(const RunProgramConfig &config) {
|
||||
readable_file_name_set.insert(abspath(0, string(self_path) + "/../runtime") + "/");
|
||||
# ifdef UOJ_JUDGER_BASESYSTEM_UBUNTU1804
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/cpu/");
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/cpu,cpuacct/");
|
||||
readable_file_name_set.insert("/sys/fs/cgroup/memory/");
|
||||
readable_file_name_set.insert("/etc/oracle/java/usagetracker.properties");
|
||||
# endif
|
||||
@ -577,11 +580,10 @@ void init_conf(const RunProgramConfig &config) {
|
||||
soft_ban_file_name_set.insert("/etc/passwd"); // for javac = =
|
||||
|
||||
readable_file_name_set.insert("/etc/timezone");
|
||||
# ifndef UOJ_JUDGER_FPC_VERSION
|
||||
readable_file_name_set.insert("/etc/fpc-2.6.2.cfg.d/");
|
||||
# endif
|
||||
# ifdef UOJ_JUDGER_FPC_VERSION
|
||||
readable_file_name_set.insert("/etc/fpc-" UOJ_JUDGER_FPC_VERSION ".cfg.d/");
|
||||
# else
|
||||
readable_file_name_set.insert("/etc/fpc-2.6.2.cfg.d/");
|
||||
# endif
|
||||
readable_file_name_set.insert("/etc/fpc.cfg");
|
||||
|
||||
|
@ -50,8 +50,8 @@
|
||||
<p>默认的测评环境是 Ubuntu Linux 18.04 LTS x64。</p>
|
||||
<p>C的编译器是 gcc 7.4.0,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
||||
<p>C++的编译器是 g++ 7.4.0,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
||||
<p>Java8的JDK版本是 openjdk 1.8.0_212,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Java11的JDK版本是 openjdk 11.0.3,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Java8的JDK版本是 openjdk 1.8.0_222,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Java11的JDK版本是 openjdk 11.0.4,编译命令:<code>javac code.java</code>。</p>
|
||||
<p>Pascal的编译器是 fpc 3.0.4,编译命令:<code>fpc code.pas -O2</code>。</p>
|
||||
<p>Python会先编译为优化过的字节码<samp>.pyo</samp>文件。支持的Python版本分别为Python 2.7和3.6。</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user