-
-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: Track 'actions since timeout check' globally #7593
Conversation
Welcome back! How about moving |
AVM2 has a similar timeout too. Doesn't mean it'll be implemented the same way, but right now, I don't see why it couldn't be. |
Hmm, two questions, both related to my old comment in #3628:
I'm assuming this means my assumption was wrong here? Does this swf do something particularly weird? Second question: could we increase the action count limit a bit? This PR will increase the average number of checks per frame (as previously functions that executed <2000 actions were never interrupted by a time check), so would be nice to offset that to not get an accidental perf regression. |
So in essence, this issue is basically a fancier version of this: Frame 1 executes, gets a new context, gets a new activation, executes a couple of actions, done with activation, done with context. Activations don't count the actions held in sub-activations - so that method only catches infinite loops at a single level of an activation, not counting its children or parents.
I have no strong feelings either way! |
I just tested on Meat Boy on FF and the profiles don't appear to show any meaningful difference, so I guess it's not a big deal either way. Personally I'd still bump it for a peace of mind, but that's just me :) |
My main concern is keeping AVM1 and AVM2 as much self-hosted as possible, so in the future it'll be easier to make them optional (#6750). |
Having a single variable and test for inactivity doesn't need to hinder a separation of VMs, and seems preferable to two pieces of code tracking (and polling) for the same thing. I'd argue that this should be in player. It's a general script timeout, not a specific avm1 timeout. |
cc7e016
to
6828b37
Compare
0d414fb
to
9b8ac12
Compare
9b8ac12
to
c8f0b27
Compare
We're missing cases (like #554) where the infinite loop is across multiple AVM activations. They'll eat all the memory and crash, instead of being caught by our timeout check.
This seems to match the Flash Player's behaviour more closely too.
(also hi <3)