| Summary: | Nullptr crash in InlineTextBox::emphasisMarkExistsAndIsAbove | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||||||
| Component: | Layout and Rendering | Assignee: | Antti Koivisto <koivisto> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | ajuma, bfulgham, cdumez, esprehn+autocc, ews-watchlist, glenn, jacob_uphoff, koivisto, kondapallykalyan, mifenton, mmaxfield, pdr, product-security, rohitrao, shihchieh_lee, simon.fraser, sunny_he, webkit-bug-importer, zalan | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=209695 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Ryosuke Niwa
2020-01-30 23:50:36 PST
You might also hit this crash: 0 com.apple.WebCore 0x00000006b0f58deb WTFCrashWithInfo(int, char const*, char const*, int) + 27 1 com.apple.WebCore 0x00000006b5d5ebaa WebCore::Shape::createRasterShape(WebCore::Image*, float, WebCore::LayoutRect const&, WebCore::LayoutRect const&, WebCore::WritingMode, float) + 3082 2 com.apple.WebCore 0x00000006b5d60c28 WebCore::ShapeOutsideInfo::createShapeForImage(WebCore::StyleImage*, float, WebCore::WritingMode, float) const + 1000 3 com.apple.WebCore 0x00000006b5d5f9e9 WebCore::ShapeOutsideInfo::computedShape() const + 857 4 com.apple.WebCore 0x00000006b5d62dc9 WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine(WebCore::RenderBlockFlow const&, WebCore::FloatingObject const&, WebCore::LayoutUnit, WebCore::LayoutUnit) + 1017 5 com.apple.WebCore 0x00000006b5d030dc WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(WebCore::FloatingObject const&) + 460 6 com.apple.WebCore 0x00000006b58005ed WebCore::ComplexLineLayout::positionNewFloatOnLine(WebCore::FloatingObject const&, WebCore::FloatingObject*, WebCore::LineInfo&, WebCore::LineWidth&) + 317 7 com.apple.WebCore 0x00000006b5cf7db4 WebCore::LineBreaker::skipLeadingWhitespace(WebCore::BidiResolverWithIsolate<WebCore::InlineIterator, WebCore::BidiRun, WebCore::BidiIsolatedRun>&, WebCore::LineInfo&, WebCore::FloatingObject*, WebCore::LineWidth&) + 932 8 com.apple.WebCore 0x00000006b5cf8226 WebCore::LineBreaker::nextLineBreak(WebCore::BidiResolverWithIsolate<WebCore::InlineIterator, WebCore::BidiRun, WebCore::BidiIsolatedRun>&, WebCore::LineInfo&, WebCore::RenderTextInfo&, WebCore::FloatingObject*, unsigned int, WTF::Vector<WebCore::WordMeasurement, 64ul, WTF::CrashOnOverflow, 16ul>&) + 518 9 com.apple.WebCore 0x00000006b57f5c9b WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange(WebCore::LineLayoutState&, WebCore::BidiResolverWithIsolate<WebCore::InlineIterator, WebCore::BidiRun, WebCore::BidiIsolatedRun>&, WebCore::InlineIterator const&, WebCore::BidiStatus const&, unsigned int) + 1723 10 com.apple.WebCore 0x00000006b57f3c3b WebCore::ComplexLineLayout::layoutRunsAndFloats(WebCore::LineLayoutState&, bool) + 1275 11 com.apple.WebCore 0x00000006b57fb8be WebCore::ComplexLineLayout::layoutLineBoxes(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 2238 12 com.apple.WebCore 0x00000006b5900637 WebCore::RenderBlockFlow::layoutInlineChildren(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 407 13 com.apple.WebCore 0x00000006b58febcf WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 1135 14 com.apple.WebCore 0x00000006b58c5905 WebCore::RenderBlock::layout() + 277 15 com.apple.WebCore 0x00000006b5903d9f WebCore::RenderBlockFlow::insertFloatingObject(WebCore::RenderBox&) + 687 16 com.apple.WebCore 0x00000006b5cf7d9a WebCore::LineBreaker::skipLeadingWhitespace(WebCore::BidiResolverWithIsolate<WebCore::InlineIterator, WebCore::BidiRun, WebCore::BidiIsolatedRun>&, WebCore::LineInfo&, WebCore::FloatingObject*, WebCore::LineWidth&) + 906 17 com.apple.WebCore 0x00000006b5cf8226 WebCore::LineBreaker::nextLineBreak(WebCore::BidiResolverWithIsolate<WebCore::InlineIterator, WebCore::BidiRun, WebCore::BidiIsolatedRun>&, WebCore::LineInfo&, WebCore::RenderTextInfo&, WebCore::FloatingObject*, unsigned int, WTF::Vector<WebCore::WordMeasurement, 64ul, WTF::CrashOnOverflow, 16ul>&) + 518 18 com.apple.WebCore 0x00000006b57f5c9b WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange(WebCore::LineLayoutState&, WebCore::BidiResolverWithIsolate<WebCore::InlineIterator, WebCore::BidiRun, WebCore::BidiIsolatedRun>&, WebCore::InlineIterator const&, WebCore::BidiStatus const&, unsigned int) + 1723 19 com.apple.WebCore 0x00000006b57f3c3b WebCore::ComplexLineLayout::layoutRunsAndFloats(WebCore::LineLayoutState&, bool) + 1275 20 com.apple.WebCore 0x00000006b57fb8be WebCore::ComplexLineLayout::layoutLineBoxes(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 2238 21 com.apple.WebCore 0x00000006b5900637 WebCore::RenderBlockFlow::layoutInlineChildren(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&) + 407 22 com.apple.WebCore 0x00000006b58febcf WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) + 1135 23 com.apple.WebCore 0x00000006b58c5905 WebCore::RenderBlock::layout() + 277 24 com.apple.WebCore 0x00000006b5c7d08b WebCore::RenderView::layout() + 1531 25 com.apple.WebCore 0x00000006b5021178 WebCore::FrameViewLayoutContext::layout() + 1448 26 com.apple.WebCore 0x00000006b405ec09 WebCore::Document::updateLayout() + 537 27 com.apple.WebCore 0x00000006b4060ff3 WebCore::Document::updateLayoutIgnorePendingStylesheets(WebCore::Document::RunPostLayoutTasks) + 147 28 com.apple.WebCore 0x00000006b413b3c5 WebCore::Element::scrollLeft() + 181 29 com.apple.WebCore 0x00000006b4137da1 WebCore::Element::scrollBy(WebCore::ScrollToOptions const&) + 257 30 com.apple.WebCore 0x00000006b4138298 WebCore::Element::scrollBy(double, double) + 312 Created attachment 389333 [details]
Test case (unreduced)
Antti is looking into this. Created attachment 394722 [details]
reduced test case
Created attachment 394724 [details]
patch
Comment on attachment 394724 [details]
patch
I was under the impression that the teardown direction was incorrect (re: email).
As discussed, changing the removal order may also be helpful. Committed r259158: <https://trac.webkit.org/changeset/259158> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394724 [details]. Reverted r259158 for reason: This commit caused an assertion failure Committed r259232: <https://trac.webkit.org/changeset/259232> (In reply to Jacob Uphoff from comment #9) > Reverted r259158 for reason: > > This commit caused an assertion failure > > Committed r259232: <https://trac.webkit.org/changeset/259232> What what kind of assertion failures? https://build.webkit.org/results/Apple-Catalina-Debug-WK2-Tests/r259158%20(3190)/editing/selection/focus-and-display-none-crash-log.txt ASSERTION FAILED: m_renderRange.startOffset() ./rendering/HighlightData.h(84) : unsigned int WebCore::HighlightData::startOffset() const 1 0x7f20e8229 WTFCrash 2 0x7d51eeffb WTFCrashWithInfo(int, char const*, char const*, int) 3 0x7d90faf88 WebCore::HighlightData::startOffset() const 4 0x7d90fae38 WebCore::InlineTextBox::selectionStartEnd() const 5 0x7d90fe943 WebCore::createMarkedTextFromSelectionInBox(WebCore::InlineTextBox const&) 6 0x7d90fccb2 WebCore::InlineTextBox::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&, WebCore::LayoutUnit, WebCore::LayoutUnit) 7 0x7d90f64cb WebCore::InlineFlowBox::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&, WebCore::LayoutUnit, WebCore::LayoutUnit) 8 0x7d93fd071 WebCore::RootInlineBox::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&, WebCore::LayoutUnit, WebCore::LayoutUnit) 9 0x7d92e69d8 WebCore::RenderLineBoxList::paint(WebCore::RenderBoxModelObject*, WebCore::PaintInfo&, WebCore::LayoutPoint const&) const 10 0x7d91566e1 WebCore::RenderBlockFlow::paintInlineChildren(WebCore::PaintInfo&, WebCore::LayoutPoint const&) 11 0x7d912b78e WebCore::RenderBlock::paintContents(WebCore::PaintInfo&, WebCore::LayoutPoint const&) This is not actually a good approach since it may leave stray selection state behind in the render tree. Zalan already fixed the crash here in an alternative way in https://bugs.webkit.org/show_bug.cgi?id=209695. I'll just reland the test here and add a null check in case there are still cases not covered by 209695. Created attachment 395028 [details]
patch
Committed r259286: <https://trac.webkit.org/changeset/259286> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395028 [details]. |