[Webkit-unassigned] [Bug 64284] New: chrome.dll!WebCore::RenderBox::paintBoxDecorations ReadAV at NULL (3841c4d465d16231a20527cd51ba8235)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 11 08:24:14 PDT 2011


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

           Summary: chrome.dll!WebCore::RenderBox::paintBoxDecorations
                    ReadAV at NULL (3841c4d465d16231a20527cd51ba8235)
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P1
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: skylined at chromium.org
                CC: eric at webkit.org


Chromium: https://code.google.com/p/chromium/issues/detail?id=88926


<body onload="go()"></body>
<script>
  function go() {
    document.open();
    var oUElement = document.createElement("U");
    oUElement.hidden=true;
    oUElement.innerHTML="<style>*{-webkit-border-before-style:groove}";
    document.appendChild(oUElement);
    document.close();
  }
</script>

(Adam, this is the bug I emailed you about before)

The repro triggers an ASSERT in Document::setCompatibilityMode:
webkit\source\webcore\dom\document.cpp
void Document::setCompatibilityMode(CompatibilityMode mode)
{
    if (m_compatibilityModeLocked || mode == m_compatibilityMode)
        return;
    ASSERT(!m_styleSheets->length());
    bool wasInQuirksMode = inQuirksMode();
    m_compatibilityMode = mode;
    if (inQuirksMode() != wasInQuirksMode) {
        // All user stylesheets have to reparse using the different mode.
        clearPageUserSheet();
        clearPageGroupUserSheets();
    }
}

The stylesheet specified in the innerHTML has been added, so m_styleSheets->length() == 1.

This ASSERT does not seem to be obviously related to the eventual NULL ptr crash in RenderBox::paintBoxDecorations:
webkit\source\webcore\rendering\renderbox.cpp
void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
<snip>
    // If we have a native theme appearance, paint that before painting our background.
    // The theme will tell us whether or not we should also paint the CSS background.
    bool themePainted = style()->hasAppearance() && !theme()->paint(this, paintInfo, paintRect);
    if (!themePainted) {
        if (isRoot())
            paintRootBoxFillLayers(paintInfo);
        else if (!isBody() || document()->documentElement()->renderer()->hasBackground()) {
<snip>
}
The last line results in an attempt to call "hasBackground" on the m_style property of a RenderObject. This property is NULL, so this leads to a NULL ptr crash.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list