HUSTOJ adds other languages to the solution of RuntimeError

HUSTOJ adds other languages, such as Python, Java, Pascal, etc. If the program is correct, but an error is reported, just add okcall.

See the log for specific errors:

 [ERROR] A Not allowed system call: runid:运行编号 callid:id号
TO FIX THIS , ask admin to add the CALLID into corresponding LANG_XXV[] located at okcalls32/64.h ,and recompile judge_client

Modify the evaluation machine okcall file (such as core/judge_client/okcall64.h), and add callid: the id number after the corresponding language, try not to add it at the beginning or end, some arrays are 0 at the beginning and end, there may be something special Meaning too!

 

CV is C language; PV is Pascal language; JV is Java language; YV is Python language... If you don't know which V corresponds to which language, please see the judge_client.cc source code:

void init_syscalls_limits(int lang) {
    int i;
    memset(call_counter, 0, sizeof(call_counter));
    if (DEBUG)
        write_log("init_call_counter:%d", lang);
    if (record_call) { // C & C++
        for (i = 0; i < call_array_size; i++) {
            call_counter[i] = 0;
        }
    } else if (lang <= 1) { // C & C++
        for (i = 0; i==0||LANG_CV[i]; i++) {
            call_counter[LANG_CV[i]] = HOJ_MAX_LIMIT;
        }
    } else if (lang == 2) { // Pascal
        for (i = 0; i==0||LANG_PV[i]; i++)
            call_counter[LANG_PV[i]] = HOJ_MAX_LIMIT;
    } else if (lang == 3) { // Java
        for (i = 0; i == 0 || LANG_JV [i]; i ++)
            call_counter [LANG_JV [i]] = HOJ_MAX_LIMIT;
    } else if (lang == 4) {// Ruby
        for (i = 0; i == 0 || LANG_RV [i]; i ++)
            call_counter [LANG_RV [i]] = HOJ_MAX_LIMIT;
    } else if (lang == 5) {// Bash
        for (i = 0; i == 0 || LANG_BV [i]; i ++)
            call_counter [LANG_BV [i]] = HOJ_MAX_LIMIT;
    } else if (lang == 6) {// Python
        for (i = 0; i == 0 || LANG_YV [i]; i ++)
            call_counter [LANG_YV [i]] = HOJ_MAX_LIMIT;
    } else if (lang == 7) {// php
        for (i = 0; i == 0 || LANG_PHV [i]; i ++)
            call_counter [LANG_PHV [i]] = HOJ_MAX_LIMIT;
    } else if (lang == 8) {// perl
        for (i = 0; i==0||LANG_PLV[i]; i++)
            call_counter[LANG_PLV[i]] = HOJ_MAX_LIMIT;
    } else if (lang == 9) { // mono c#
        for (i = 0; i==0||LANG_CSV[i]; i++)
            call_counter[LANG_CSV[i]] = HOJ_MAX_LIMIT;
    } else if (lang == 10) { //objective c
        for (i = 0; i==0||LANG_OV[i]; i++)
            call_counter[LANG_OV[i]] = HOJ_MAX_LIMIT;
    } else if (lang == 11) { //free basic
        for (i = 0; i==0||LANG_BASICV[i]; i++)
            call_counter[LANG_BASICV[i]] = HOJ_MAX_LIMIT;
    } else if (lang == 12) { //scheme guile
        for (i = 0; i==0||LANG_SV[i]; i++)
            call_counter[LANG_SV[i]] = HOJ_MAX_LIMIT;
    }

}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324839122&siteId=291194637
Recommended