11 Commits
Author SHA1 Message Date
J1coding 4391670f5b GS: make the software JIT cache overflow path real
The software rasterizer has a recovery path for running out of code space:
SetupDraw returns false, the caller resets the cache and asks again. It has
never been able to run.

ReserveMemory only had a pxAssert, which is compiled out of a release build,
so it always handed back a pointer. GetDefaultFunction has no other way to
fail, so SetupDraw could not return false, so ResetCodeCache never ran. What
happens instead is that the bump pointer walks off the end of the reserve,
and since the software renderer sits last in the code arena, that is the end
of the arena.

It would not have worked if it had run, either. Clear emptied the codegen map
and rewound the pointer but left the active map holding pointers into memory
about to be handed out again, so the next lookup would have jumped into
whatever replaced it.

So: ReserveMemory reports full, Clear drops the active map along with the
codegen map, and a null is deliberately not cached on the way out. That last
one matters more than it looks. The active map is consulted before anything
else, so an entry cached during the failure would have survived the reset
that was supposed to fix it and gone on answering null for that selector for
the rest of the run.

Nothing here is iOS specific. It reads the same on every platform, we are
just the ones with a reason to have been looking.
2026-07-30 17:38:45 +02:00
SternXD d983b2b066 Copyright: Change year from 2002-2025 to 2002-2026 2026-01-15 00:22:32 +01:00
TheTechnician27 23fd57f641 Copyright: Change year from 2002-2024 to 2002-2025 2025-01-20 05:07:26 +01:00
GovanifY 132431b7c8 headers: relicense to GPL-3.0+
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
Stenzek fb15893521 VMManager: Remove and merge System.cpp 2023-12-27 13:55:35 +10:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Stenzek 606cbb3883 System: Simplify memory allocation 2023-10-10 18:01:30 +10:00
Stenzek 4cf041f6cb Common: Move VirtualMemory related functionality to core
Also rewrites page fault handling to not use EventSource junk.
2023-01-26 11:11:36 +00:00
Gauvain 'GovanifY' Roussel-Tarbouriech 18e892f473 gs: update license headers 2021-07-03 18:16:11 -04:00
Gauvain 'GovanifY' Roussel-Tarbouriech fc1e00b7ef gs: trying to sort out this include hell 2021-07-03 18:16:11 -04:00
Gauvain 'GovanifY' Roussel-Tarbouriech 587a893a0e gs-merge: remove initial plugin subsystem 2021-07-03 18:16:11 -04:00