Skip to content

Commit

Permalink
HookSystemManager: Make needsDeadCleanup volatile
Browse files Browse the repository at this point in the history
The value of needsDeadCleanup would be clobbered after longjmp,
having an undefined value.
  • Loading branch information
JohnMH committed Jun 7, 2024
1 parent fdedff2 commit 04cab51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/managers/HookSystemManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void CHookSystemManager::emit(std::vector<SCallbackFNPtr>* const callbacks, SCal
return;

std::vector<HANDLE> faultyHandles;
bool needsDeadCleanup = false;
volatile bool needsDeadCleanup = false;

for (auto& cb : *callbacks) {

Expand Down Expand Up @@ -80,4 +80,4 @@ std::vector<SCallbackFNPtr>* CHookSystemManager::getVecForEvent(const std::strin
Debug::log(LOG, "[hookSystem] New hook event registered: {}", event);

return &m_mRegisteredHooks[event];
}
}

0 comments on commit 04cab51

Please sign in to comment.