Recently I compiled a program in
GNU MIX. The program is rather simple and only contains an unconditional jump to the only instruction, which is essentially a infinite loop.
The problem is, when I run the program using the
mixvm, the system hangs. That may be a separate issue and I may just submit a bug report to
GNU MIX. Even executing the following doesn't help
mixvm -r infiniteloop.mix & sleep 5 && killall mixvm
My question is, is there a simple way to execute a program that may possibly hang the computer in a sandboxed environment so that it only hangs the sandbox?
I am looking for an approach that does not require setting up virtual machines. I am not sure whether this should be identified as "malicious code" as I trust the program won't do anything concerning the security issues like stealing my password or wiping my disk. The only issue with it is that it may hang the computer irrecoverably (the only way to recover is forced reboot or possibly (I didn't try it) sending a SysRq).
I am running
Ubuntu 16.04.4 LTS.
I am not so familiar with virtualization so please feel free to correct me if there's something obvious that I happen to miss.