yuzu
yuzu copied to clipboard
Rocket League: Won't boot anymore after Mainline 458
Rocket League version 1.0.0 regressed in mainline 458. It used to work fine in mainline 456.
It now SVCbreaks after SetThreadCoreMask returns an error.
https://github.com/yuzu-emu/yuzu/pull/4996 is very likely the Pull Request that caused the regression.
While #4996 may have caused the regression to appear, the root cause is undefined behavior in the game. It creates a new thread class on the heap using operator new, and passes this thread class to a new KThread, which then calls SetThreadCoreMask with an uninitialized memory value that originated from this call to operator new.
Thread 99 "yuzu:CPUCore_0" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7f7d337f6640 (LWP 18507)]
Kernel::Svc::SetThreadCoreMask (system=..., thread_handle=459251, core_id=core_id@entry=-1917688664, affinity_mask=affinity_mask@entry=1)
Can be worked around by setting main+0xab8dd4 = 0xd503201f (little endian). The game starts the thread before assigning a value it uses, and wins this race on console due to not having recompilation overhead from Dynarmic.