WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
241736
[PlayStation] RunLoopGeneric has memory leak in vector of ScheduledTask
https://bugs.webkit.org/show_bug.cgi?id=241736
Summary
[PlayStation] RunLoopGeneric has memory leak in vector of ScheduledTask
Basuke Suzuki
Reported
2022-06-17 17:29:04 PDT
The ScheduledTask object is ref counted. There are two main owners, RunLoop::TimerBase m_scheduledTask and RunLoop::m_schedules vector. When new timer is scheduled while current one is active but not fired, it is marked as inactive to make it not fired in the future, and new one is created with active state. The old one will be removed eventually when original timing come to fire. But when JSRun loop cancel running timer, it just set a new timer (to cancel the running one) with the value of long interval (it is 10 years). Then invalidated timers with those long interval has no chance to be removed from the task list. With a simple application with using repeating timer, it is easily observed that we see tens of thousands of inactive objects in the list in just a few minutes.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-06-24 17:30:13 PDT
<
rdar://problem/95890501
>
Brent Fulgham
Comment 2
2022-06-30 13:16:56 PDT
Note: Apple ports do not use this code, so this is not relevant to specific iOS or macOS releases.
Fujii Hironori
Comment 3
2022-06-30 13:26:39 PDT
JSCOnly port and PlayStation port are using RunLoopGeneric.cpp.
Yusuke Suzuki
Comment 4
2022-07-07 18:30:05 PDT
Basuke already has a fix (he is on PTO).
Basuke Suzuki
Comment 5
2022-07-29 16:52:02 PDT
https://github.com/WebKit/WebKit/pull/2869
EWS
Comment 6
2022-08-03 01:50:45 PDT
Committed
253065@main
(cef910fdba39): <
https://commits.webkit.org/253065@main
> Reviewed commits have been landed. Closing PR #2869 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug