-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating Python as allowed compiler #8
Comments
It's actually pretty straightforward to add a basic support for Python using the mechanism created for Java solutions, which are not compiled to binaries, but to bytecode, instead. The tricky part is making it secure, especially that, the currently used supervisor is not open-sourced. In case you can disregard this, the current source->execution flow for Java is as follows:
In the codebase you'll encounter three main concepts:
|
Correct me if I'm wrong, but would it be as secure as it's with C solutions if Python was translated to C and then graded and executed as any other C solution? |
It depends on the translation. AFAIU Cython creates Python extensions, which still require the Python runtime to run inside the supervisor. So, from the security standpoint, it doesn't matter, if the code is compiled or interpreted by Python. The issue is that, the supervisor might be too harsh for the runtime – it allows only a very limited subset of syscalls. |
We switched to from the closed-source supervisor to sio2jail, and as I've said in sio2project/oioioi#9, we have a working support for Python, up and running on |
Any progress on this? |
It needs some unit tests, and nobody has time and energy to write them |
Hello.
I was thinking of possibility of a work around for running Python with oioioi. Currently project requires to run a binary. This could be resolved using Cython - Python code would be transpiled to C or C++ source and then compiled with appropriate compiler. This however would impose double step in compilation with seems to break the current process as there is no support for variable number of steps which produce binary. Any guidance on whether it is even needed and if so, how to proceed?
The text was updated successfully, but these errors were encountered: