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.
This commit is contained in:
Ryan Houdek committed 2026-01-04 17:29:11 -08:00
1 parent 3728f5f178
commit 721ceecd70
1 file changed
+6
@@ -409,6 +409,12 @@ public:
return false;
}
if (Thread) {
// Update the thread persona.
auto ThreadObject = static_cast<FEX::HLE::ThreadStateObject*>(Thread->FrontendPtr);
ThreadObject->persona = ::personality(0xffffffff);
}
// What about ASLR and such ?
// ADDR_LIMIT_3GB STACK -> 0xc0000000 else -> 0xFFFFe000