ioi / isolate

Sandbox for securely executing untrusted programs
Other
1.05k stars 157 forks source link

Memory limit violation throws fatal signal 11 #83

Closed horvathgyozo closed 4 years ago

horvathgyozo commented 4 years ago

I have the following cpp program, which basically allocates memory all the time.

#include<bits/stdc++.h> 

int main() 
{ 
    while (true) 
      int *a = new int;  // allocating  
}

And running the following command gives Caught fatal signal 11:

isolate --init
g++ main.cpp -o main.bin
isolate --run -m 1000 -- /bin/bash ./main.bin

Tried in native environment, in Docker, both on Ubuntu.

Am I doing something wrong, or isolate has some problem?

horvathgyozo commented 4 years ago

OK, from this in #5 I can see that there is no Out-of-memory message, just signal. So I close this.