mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 13:00:05 +00:00
d8deb39b83
Moves the memory writes directly into QueryProcessMemory instead of letting the wrapper function do it. It would be inaccurate to allow the handler to do it because there's cases where memory shouldn't even be written to. For example, if the given process handle is invalid. HOWEVER, if the memory writing is within the wrapper, then we have no control over if these memory writes occur, meaning in an error case, 68 bytes of memory randomly get trashed with zeroes, 64 of those being written to wherever the memory info address points to, and the remaining 4 being written wherever the page info address points to. One solution in this case would be to just conditionally check within the handler itself, but this is kind of smelly, given the handler shouldn't be performing conditional behavior itself, it's a behavior of the managed function. In other words, if you remove the handler from the equation entirely, does the function still retain its proper behavior? In this case, no. Now, we don't potentially trash memory from this function if an invalid query is performed. |
||
---|---|---|
.. | ||
arm | ||
crypto | ||
file_sys | ||
frontend | ||
gdbstub | ||
hle | ||
loader | ||
tracer | ||
CMakeLists.txt | ||
core_cpu.cpp | ||
core_cpu.h | ||
core_timing_util.cpp | ||
core_timing_util.h | ||
core_timing.cpp | ||
core_timing.h | ||
core.cpp | ||
core.h | ||
cpu_core_manager.cpp | ||
cpu_core_manager.h | ||
memory_hook.cpp | ||
memory_hook.h | ||
memory_setup.h | ||
memory.cpp | ||
memory.h | ||
perf_stats.cpp | ||
perf_stats.h | ||
settings.cpp | ||
settings.h | ||
telemetry_session.cpp | ||
telemetry_session.h |