mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Win32 debugger: take the shutdown lock everywhere core state is read
Seven GUI-thread readers held only g_frameMutex, which guards against the CPU thread mutating state but not against the core being torn down - and two of PSP_Shutdown's paths (EmuScreen::sendMessage, ProcessScreenSwitches) run outside that span entirely. CtrlThreadList::reloadThreads walking kernel objects that __KernelShutdown had freed was the concrete crash; the symbol map readers (CDisasm::Show/NotifyMapLoaded, CtrlModuleList, CtrlWatchList) had the same shape. Always g_frameMutex first, then Memory::Lock(). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
This commit is contained in:
1 parent
4a10fa2808
commit
f57a102027
4 files changed
+11
-2
No files matched your search
@@ -730,6 +730,7 @@ void CDisasm::Show(bool bShow, bool includeToTop) {
|
||||
// thread - hold g_frameMutex for the duration of the read, which NativeFrame() also
|
||||
// holds while it's actually touching that state. See g_frameMutex in Core.h.
|
||||
std::lock_guard<std::mutex> frameGuard(g_frameMutex);
|
||||
Memory::MemoryInitedLock memLock = Memory::Lock();
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
|
||||
deferredSymbolFill_ = false;
|
||||
}
|
||||
@@ -740,6 +741,7 @@ void CDisasm::Show(bool bShow, bool includeToTop) {
|
||||
void CDisasm::NotifyMapLoaded() {
|
||||
if (m_bShowState != SW_HIDE && g_symbolMap) {
|
||||
std::lock_guard<std::mutex> frameGuard(g_frameMutex);
|
||||
Memory::MemoryInitedLock memLock = Memory::Lock();
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
|
||||
} else {
|
||||
deferredSymbolFill_ = true;
|
||||
|
||||
Reference in new issue
Block a user