2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00
yuzu/src/core
Lioncash d8deb39b83 svc: Handle memory writing explicitly within QueryProcessMemory
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.
2018-12-12 15:43:31 -05:00
..
arm
crypto Merge pull request #1836 from lioncash/unused 2018-12-04 18:28:15 -05:00
file_sys Merge pull request #1846 from lioncash/dir 2018-12-10 21:54:03 -05:00
frontend Merge pull request #1667 from DarkLordZach/swkbd 2018-11-20 08:24:11 -08:00
gdbstub gdbstub: Silence value truncation warning within FpuWrite() 2018-11-26 19:58:23 -05:00
hle svc: Handle memory writing explicitly within QueryProcessMemory 2018-12-12 15:43:31 -05:00
loader Merge pull request #1819 from DarkLordZach/disable-addons 2018-12-10 21:52:19 -05:00
tracer
CMakeLists.txt Merge pull request #1704 from DarkLordZach/oss-sysarchive 2018-12-04 19:59:52 -05:00
core.cpp core: Make GetGameFileFromPath function externally accessible 2018-12-03 17:20:34 -05:00
core.h core: Make GetGameFileFromPath function externally accessible 2018-12-03 17:20:34 -05:00
core_cpu.cpp
core_cpu.h
core_timing.cpp
core_timing.h
core_timing_util.cpp
core_timing_util.h
cpu_core_manager.cpp core: Relocate CPU core management to its own class 2018-11-22 04:28:19 -05:00
cpu_core_manager.h core: Relocate CPU core management to its own class 2018-11-22 04:28:19 -05:00
memory.cpp memory: Convert ASSERT into a DEBUG_ASSERT within GetPointerFromVMA() 2018-12-06 15:02:34 -05:00
memory.h
memory_hook.cpp
memory_hook.h
memory_setup.h
perf_stats.cpp
perf_stats.h
settings.cpp hid: Use player-defined controller type as PREFERRED_CONTROLLER 2018-11-18 23:22:36 -05:00
settings.h settings: Store list of disabled add-ons per title ID 2018-12-03 17:20:34 -05:00
telemetry_session.cpp web_service: move telemetry condition from TelemetrySession constructor to destructor 2018-12-08 14:34:37 +01:00
telemetry_session.h