Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Protect against deregistered profile functions in greenlet switches
When greenlet tracking is enabled is possible that we run into a situation where the function that recreates the Python stack in our TLS variable after a greenlet switch is called **after** the profile function has been deactivated. In this case, recreating the Python stack is wrong as we are no longer tracking POP/PUSH events so when the stack is inspected later nothing guarantees that the frames are still valid.
- Loading branch information