[Webkit-unassigned] [Bug 226963] New: ConcreteImageBuffer calls virtual function erroneously in destructor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 14 03:23:29 PDT 2021


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

            Bug ID: 226963
           Summary: ConcreteImageBuffer calls virtual function erroneously
                    in destructor
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kkinnunen at apple.com
                CC: dino at apple.com

ConcreteImageBuffer calls virtual function erroneously in destructor

Calls flushDrawingContext().

Virtual function call ends up calling the currently destructed class version of the function, not the final overridden function.

In case of all ConcreteImageBuffer inheritance chains, this is semi-surprising behavioral difference in case of RemoteImageBufferProxy which overrides flush.
The code that is produced is incorrect as per logic.
As it stands today, the code doesn't crash as the ~RemoteImageBufferProxy flushes and that causes early-out in ConcreteImageBuffer::flushDrawingContext().

However, if ~RemoteImageBufferProxy does not cause the early out, it appears that the ConcreteImageBuffer::flushDrawingContext() seems to crash in a non-trivial convoluted way.

As this is surprising and typically incorrect pattern, it should be mostly not done.

-- 
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/20210614/aff00f33/attachment.htm>


More information about the webkit-unassigned mailing list