diff options
| author | Wendi Gan <[email protected]> | 2026-04-04 13:37:48 +0800 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-04-26 09:42:34 +0000 |
| commit | 2dce7352c1edfb13c90a8a3b858d113e3a9300b2 (patch) | |
| tree | ca31668647df4addaa5e174dc13ea97f08e5ae1c /appiumtests | |
| parent | e409f76a66b7fd8c11e6dd725d183c44837826de (diff) | |
Fix occasional UAF crashes in KConfig::sync() during exit
Previously, c035e95 introduced `QtConcurrent::run` to execute `KConfig::sync()` in a separate thread. However, this introduced thread-safety issue:
BUG 518433 (UAF caused by RC):
During application exit, the main thread frees the old `s_sessionConfig` in `KMWSessionManager::saveState()` to create a new one. Meanwhile, the worker thread is still iterating over the old instance's entryMap during `KConfig::sync()`, leading to a Use-After-Free (UAF) crash.
Changes:
Copy the `config` in the main thread so `KConfig::sync()` can safely run in the worker.
BUG: 518433
BUG: 516481
CCBUG: 425627
Diffstat (limited to 'appiumtests')
0 files changed, 0 insertions, 0 deletions
