[Webkit-unassigned] [Bug 156420] New: Use WeakPtrs to avoid using deallocated Widgets and ScrollableAreas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 8 14:59:53 PDT 2016


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

            Bug ID: 156420
           Summary: Use WeakPtrs to avoid using deallocated Widgets and
                    ScrollableAreas
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Event Handling
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bfulgham at webkit.org

Bugs 150871 and 156409 were caused by Events destroying elements that were currently in use to handle wheel events. Since the EventHandler logic held onto raw pointers to these elements (not expecting them to be destroyed during the same method call), we would dereference these invalid pointers causing crashes and other problems.

We can do a better job by using WeakPtrs (instead of bare pointers) that will become null when the underlying object is destroyed. This will convert various use-after-free problems into null-pointer dereferences, which are much safer, and easier to find. By using proper null checking, we can avoid crashes and ensure proper behavior in these cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160408/2ee4451e/attachment-0001.html>


More information about the webkit-unassigned mailing list