piston icon indicating copy to clipboard operation
piston copied to clipboard

C++ is unstable in piston api.

Open SharkFishDeveloper opened this issue 1 year ago • 3 comments

Around 70% of the time, it shows SIGKILL error . Can someone fix it

SharkFishDeveloper avatar Jul 08 '24 12:07 SharkFishDeveloper

Can you show the code that is causing this?

Brikaa avatar Jul 08 '24 12:07 Brikaa

{ language: 'cpp', version: '10.2.0', files: [ { name: 'index.g++', content: '\r\n' + ' #include \r\n' + ' using namespace std;\r\n' + '\r\n' + ' int add (int num1, int num2) {\r\n' + ' // Your code\r\n' + ' return num1+num2;\r\n' + '}\r\n' + '\r\n' + ' int main() {\r\n' + ' \r\n' + ' \r\n' + ' int a1 = add(1,3);\r\n' + ' cout<< a1<<endl;\r\n' + ' \r\n' + ' \r\n' + ' int a2 = add(4,5);\r\n' + ' cout<< a2<<endl;\r\n' + ' return 0;\r\n' + ' }\r\n' + ' \r\n' + ' ' } ], stdin: '', args: [], compile_timeout: 10000, run_timeout: 3000, compile_memory_limit: -1, run_memory_limit: -1 } { compile: { stdout: '', stderr: '', code: null, signal: 'SIGKILL', output: '' }, run: { stdout: '', stderr: '', code: null, signal: 'SIGKILL', output: '' }, language: 'c++', version: '10.2.0' }

I ran very simple Codes like this one , it sometimes runs sometimes doesn't

SharkFishDeveloper avatar Jul 08 '24 14:07 SharkFishDeveloper

Try increasing the run_timeout, please let us know here if the issue still persists.

adityasharmawork avatar Oct 25 '25 10:10 adityasharmawork