mesen2: all 5 MOADs CLEAN
MOAD-0001 CWE-407: CLEAN. No hot-path linear scans found. - BreakpointManager uses pre-bucketed vector indexed by MemoryOperationType, O(1) dispatch - CheatManager uses unordered_map keyed by address, O(1) lookup per read - LabelManager uses unordered_map keyed by address+type, O(1) lookup - FrozenAddressManager uses unordered_set, O(1) lookup - ProfilerManager uses unordered_map keyed by function address, O(1) lookup - ExpressionEvaluator RPN cache uses mutex-protected unordered_map, O(1) lookup - All std::find occurrences are on cold paths (ROM load, controller enumeration, startup) - KeyCombination.IsSubsetOf uses std::find on a max-3-element vector, trivially bounded MOAD-0002 Intertangle: CLEAN. Clean subsystem interfaces. - KeyManager, CheatManager, LabelManager, BreakpointManager all hold explicit Debugger/Emulator pointers rather than accessing shared global state directly. - No god objects detected. MOAD-0003 Leaked Context: CLEAN. - thread_local _currentThreadId in Emulator is used only to detect if caller is the emulation thread. It carries no request-scoped identity and does not leak across call contexts. MOAD-0004 CWE-312: CLEAN. - Netplay password is SHA1-hashed with a 50-char random nonce before transmission. - No password or credential value reaches any Log or DisplayMessage call. MOAD-0005 Thundering Herd: CLEAN. - ExpressionEvaluator cache is guarded by _cacheLock (SimpleLock) on both read and write. - No unprotected get+null+compute+put patterns found.
This commit is contained in:
parent
2a0a635c74
commit
7d118a7086