In reply to Nick.

Mobile, so short post.

There is no way for one set of code to determine if another set of code will even ever stop running. Look up the "Halting Problem".

If you have some sort of magic black box code that can determine "safety", then by all means, present it. Otherwise, consider that anything we add to core to prevent something can be bypassed by something more clever. What you're suggesting is a never ending arms race that solves nothing.