If the code behaves badly, it can do something, and it can affect something in the whole process, on any thread.
The most reliable solution is to start the untrusted code in a separate process, and then terminate the process if it works erroneously.
SLaks source
share