[Webkit-unassigned] [Bug 211539] SIGILL @ WebCore::Shape::createRasterShape -- DOS ASAN

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 7 10:46:13 PDT 2020


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

--- Comment #3 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 398689
  --> https://bugs.webkit.org/attachment.cgi?id=398689
Patch

To enable early returns, you can put this code:

    auto rasterShape = makeUnique<RasterShape>(WTFMove(intervals), marginRect.size());
    rasterShape->m_writingMode = writingMode;
    rasterShape->m_margin = margin;
    return rasterShape;

in a local lambda like so:

auto createShape = [](WritingMode writingMode, float margin) {
    auto rasterShape = makeUnique<RasterShape>(WTFMove(intervals), marginRect.size());
    rasterShape->m_writingMode = writingMode;
    rasterShape->m_margin = margin;
    return rasterShape;
};

if (!condition)
    return createShape(writingMode, margin);

You should make the existing "if (imageBuffer)" check an early return too, for consistency.

-- 
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/20200507/1e7d90d0/attachment.htm>


More information about the webkit-unassigned mailing list