RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.66k stars 1.93k forks source link

Fix potential race condition in progress dialog #16319

Closed Megamouse closed 1 week ago

Megamouse commented 2 weeks ago

m_text is new lol. It's used as storage for the const char* in the atomic object

Megamouse commented 2 weeks ago

Since we now use translatable strings instead of constexpr const char*

elad335 commented 2 weeks ago

Since we now use translatable strings instead of constexpr const char*

This is a bug, scoped_progress_dialog object can be destroyed before the the progress_dialog access it, so m_text will be freed.

Megamouse commented 1 week ago

Oops. For some reason I thought the constructor resets the ptr when the thing goes out of scope. It's not hard to fix but I can only do it later

elad335 commented 1 week ago

It's fixed in #16321, that was the point of the pr