Skip to content
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

Sync objects are leaked into the OS. #51

Open
Warepire opened this issue Aug 23, 2016 · 0 comments
Open

Sync objects are leaked into the OS. #51

Warepire opened this issue Aug 23, 2016 · 0 comments

Comments

@Warepire
Copy link
Contributor

This is a problem for both the hooks and the hooks code itself.

It's particularly evil for applications using critical sections, mutexes, semaphores etc as this can cause different kinds of deadlocks and crashes as these things may be active during save-states, and are never released, then code may come through the path again, waiting for an object that will never become free.

The internal critical sections need to be rewritten to become atomic gates. This can however not be done to replace anything on application level sync objects. A sync object is defined as any object that can be waited upon with WaitForSingleObject and family.

All of these sync objects need to have a struct with the information connected with each event. With this the objects can then be watched from the application side of Hourglass and threads calling WaitForSingleObject (or related call) can instead go to sleep and be woken by Hourglass when the object(s) are signaled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant