Files
FEX-Emu--FEX/Source/Tools/LinuxEmulation/LinuxSyscalls
Ryan Houdek a11566012d SMCTracking: Fix incorrect mprotect tracking
Fixes #3675

This was the first time I've ever actually dived in to this code and this
function melted my brain a bit while reading it. It was trying to be too
smart in tracking VMA splits, but if it split right at the end of a VMA
range it would then add a new range at the end where one already
existed. This then caused us to have overlapping VMA ranges and it would
completely break our SMC tracking since all tracking in the map must not
overlap.

Instead of being too smart, just break it down in to 4 merge strategies,
three of which are one shot. This is significantly easier to reason
about and each strategy is mostly self-contained. The fourth strategy in
the list is the most complex since it requires multiple steps since it
needs to walk multiple VMAs.

To help test this I added some sanity checking code that proved
invaluable to ensure everything was correct. That's not getting merged
since the overhead is too much to run, but good to have available. Diff
for this is at
  https://gist.github.com/Sonicadvance1/1ee60101ed0742b971a476fadbb51083
2024-06-14 14:36:16 -07:00
..
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00
2024-04-12 16:26:02 +02:00