mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
Merge pull request #5484 from neobrain/fix_code_cache_no_guest_wrappers
CodeCache: Fix crash when guest library wrappers aren't installed
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -601,8 +601,10 @@ int main(int argc, char** argv, char** const envp) {
|
||||
// Request code cache generation
|
||||
FEXServerClient::PopulateCodeCache(FEXServerClient::GetServerFD(), Loader.GetMainElfFD(), FEXCore::Config::Get_MULTIBLOCK());
|
||||
|
||||
// Finalize code cache for libVDSO-guest.so. This needs to be done explicitly since VDSO doesn't use LoadLib.
|
||||
SyscallHandler->TriggerGuestLibWrapperCodeCacheLoad(*ParentThread->Thread, reinterpret_cast<uintptr_t>(VDSOMapping.VDSOBase));
|
||||
if (VDSOMapping) {
|
||||
// Finalize code cache for libVDSO-guest.so. This needs to be done explicitly since VDSO doesn't use LoadLib.
|
||||
SyscallHandler->TriggerGuestLibWrapperCodeCacheLoad(*ParentThread->Thread, reinterpret_cast<uintptr_t>(VDSOMapping.VDSOBase));
|
||||
}
|
||||
}
|
||||
|
||||
// Pull RIP and stack pointer from loader and set the thread data to it.
|
||||
|
||||
@@ -21,6 +21,10 @@ struct VDSOMapping {
|
||||
size_t VDSOSize {};
|
||||
void* X86GeneratedCodePtr {};
|
||||
size_t X86GeneratedCodeSize {};
|
||||
|
||||
explicit operator bool() const {
|
||||
return VDSOBase != nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
struct VDSOEntrypoints {
|
||||
|
||||
Reference in new issue
Block a user