Files
AnyPS5/core/libs/prx/libSceNpSnsFacebookDialog
XairRrR 1e26b92ae1 fix(libSceNpSnsFacebookDialog): keep a terminated dialog terminated during Open and Close
sceNpSnsFacebookDialogOpen and sceNpSnsFacebookDialogClose read the
dialog status, checked it, and then stored FINISHED in a separate step.
If another thread called sceNpSnsFacebookDialogTerminate between the
read and the store, Terminate returned 0 and set the status to NONE,
and then Open or Close wrote FINISHED over it. The library was left
looking initialized after it had been terminated:
sceNpSnsFacebookDialogGetStatus returned FINISHED and the next
sceNpSnsFacebookDialogInitialize failed with ALREADY_INITIALIZED.

Open and Close now move the status to FINISHED with a compare-exchange
loop that repeats the checks against the value it replaces, so a
concurrent Terminate either happens first, making the call return
NOT_INITIALIZED, or happens after, leaving the status at NONE. Open
still offers the PSN feature notice only after a successful transition.

guest_np_sns_facebook_dialog gains two cases that race Open and Close
against Terminate for 200000 rounds each and require the status to be
NONE after every round.

AI-assisted: yes
2026-11-04 00:11:47 +01:00
..