Commit 8cd4e1f
power-libperfmgr: ADPF: fix use-after-free crash
The main problem is the timer thread could be woken after the session
was destroyed. We did have a closed flag which was set in destructor and the flag would be checked before handleMessage accessing the session
instance. To fix the problem, the operations of flag checking and session instance accessing should be guarded by the lock.
Bug: 236674672
Test: manual test
Change-Id: I49a18efbc135b1bc070b101038a8a0bcc6e19fec
(cherry picked from commit 5c75978f530b27bd976d8695ed79acd336c24776)
Merged-In: I49a18efbc135b1bc070b101038a8a0bcc6e19fec1 parent d859b1d commit 8cd4e1f
File tree
2 files changed
+5
-8
lines changed- power-libperfmgr/aidl
2 files changed
+5
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | 266 | | |
273 | 267 | | |
| 268 | + | |
| 269 | + | |
274 | 270 | | |
275 | 271 | | |
276 | 272 | | |
| |||
501 | 497 | | |
502 | 498 | | |
503 | 499 | | |
| 500 | + | |
504 | 501 | | |
505 | 502 | | |
506 | 503 | | |
| |||
530 | 527 | | |
531 | 528 | | |
532 | 529 | | |
533 | | - | |
| 530 | + | |
534 | 531 | | |
535 | 532 | | |
536 | 533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments