Skip to content

Commit b34eba2

Browse files
schm1dtmacelad335
authored andcommitted
Revert PPUThread changes
Causes GOW3 segfaults at the end of PPU linking
1 parent 6850e2e commit b34eba2

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

rpcs3/Emu/Cell/PPUThread.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5289,19 +5289,7 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
52895289
thread_ctrl::scoped_priority low_prio(-1);
52905290

52915291
#ifdef __APPLE__
5292-
// Apple Silicon W^X: PPU LLVM worker enables write mode for
5293-
// JIT memory. Pair it with an RAII guard so execute mode
5294-
// is restored on every exit path (return, exception, etc.)
5295-
// to keep per-thread state consistent at teardown.
52965292
pthread_jit_write_protect_np(false);
5297-
5298-
struct jit_write_guard
5299-
{
5300-
~jit_write_guard()
5301-
{
5302-
pthread_jit_write_protect_np(true);
5303-
}
5304-
} _jit_guard;
53055293
#endif
53065294
for (u32 i = work_cv++; i < workload.size(); i = work_cv++, g_progr_pdone++)
53075295
{
@@ -5433,19 +5421,7 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
54335421

54345422
// Jit can be null if the loop doesn't ever enter.
54355423
#ifdef __APPLE__
5436-
// Apple Silicon W^X: this scope toggles write/execute mode multiple
5437-
// times below. Use an RAII guard so execute mode is always restored
5438-
// on every exit path, including the early "return compiled_new" at
5439-
// the empty-jits check and the normal return at function end.
54405424
pthread_jit_write_protect_np(false);
5441-
5442-
struct jit_write_guard
5443-
{
5444-
~jit_write_guard()
5445-
{
5446-
pthread_jit_write_protect_np(true);
5447-
}
5448-
} _jit_guard;
54495425
#endif
54505426
// Try to patch all single and unregistered BLRs with the same function (TODO: Maybe generalize it into PIC code detection and patching)
54515427
ppu_intrp_func_t BLR_func = nullptr;

0 commit comments

Comments
 (0)