From 721ceecd7086d35edc91dc321abfa8e64017cfb1 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 23 Dec 2025 13:47:19 -0800 Subject: [PATCH] ELFCodeLoader: Update the thread persona if it was passed in Execstack enables `READ_IMPLIES_EXEC` and we were accidentally decoupling our expected persona due to the reordering of initialization. This was causing the smc-1-dynamic test to fail because it's testing execstack and our VMA tracking wasn't returning read-write VMAs as executable once these decoupled. Easy fix. --- Source/Tools/FEXInterpreter/ELFCodeLoader.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Tools/FEXInterpreter/ELFCodeLoader.h b/Source/Tools/FEXInterpreter/ELFCodeLoader.h index eb7832599..6afefaeff 100644 --- a/Source/Tools/FEXInterpreter/ELFCodeLoader.h +++ b/Source/Tools/FEXInterpreter/ELFCodeLoader.h @@ -409,6 +409,12 @@ public: return false; } + if (Thread) { + // Update the thread persona. + auto ThreadObject = static_cast(Thread->FrontendPtr); + ThreadObject->persona = ::personality(0xffffffff); + } + // What about ASLR and such ? // ADDR_LIMIT_3GB STACK -> 0xc0000000 else -> 0xFFFFe000