That's why Javascript interpreters have, blessedly, implemented "Unresponsive Script" warnings that let you kill off those scripts.
Sadly, Adobe hasn't seen fit to offer comparable functionality for dealing with a Flash application that goes berserk. But again, I think that comes down to browsers being in strong competition creating a lot of incentive for them to work hard on efficiency and UX, where Adobe is content to let usability stagnate and bugs fester.