[Webkit-unassigned] [Bug 241736] New: RunLoopGenerics has memory leak in vector of ShceduledTask

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 17 17:29:04 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=241736

            Bug ID: 241736
           Summary: RunLoopGenerics has memory leak in vector of
                    ShceduledTask
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Basuke.Suzuki at sony.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220618/2462c0a6/attachment.htm>


More information about the webkit-unassigned mailing list