[Webkit-unassigned] [Bug 227019] New: PNGImageDecoder needs clang Thread Safety annotations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 15 02:41:55 PDT 2021


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

            Bug ID: 227019
           Summary: PNGImageDecoder needs clang Thread Safety annotations
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aboya at igalia.com

+  cmake --build /app/webkit/WebKitBuild/Release --config Release -- 
[5/87] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/image-decoders/ScalableImageDecoder.cpp.o
In file included from ../../Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp:31:
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:78:17: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            if (m_frameBufferCache.isEmpty())
                ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:81:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            for (auto& imageFrame : m_frameBufferCache) {
                                  ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:81:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:91:29: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            return (index < m_frameBufferCache.size() && m_frameBufferCache[index].isComplete());
                            ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:91:58: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            return (index < m_frameBufferCache.size() && m_frameBufferCache[index].isComplete());
                                                         ^
5 warnings generated.
[6/87] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/image-decoders/ico/ICOImageDecoder.cpp.o
In file included from ../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:37:
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:78:17: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            if (m_frameBufferCache.isEmpty())
                ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:81:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            for (auto& imageFrame : m_frameBufferCache) {
                                  ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:81:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:91:29: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            return (index < m_frameBufferCache.size() && m_frameBufferCache[index].isComplete());
                            ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:91:58: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            return (index < m_frameBufferCache.size() && m_frameBufferCache[index].isComplete());
                                                         ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:90:12: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    return m_frameBufferCache.size();
           ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:99:21: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    auto* buffer = &m_frameBufferCache[index];
                    ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:163:15: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    else if ((m_frameBufferCache.size() > index) && m_frameBufferCache[index].isComplete()) {
              ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:163:53: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    else if ((m_frameBufferCache.size() > index) && m_frameBufferCache[index].isComplete()) {
                                                    ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:168:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    if (m_frameBufferCache.isEmpty())
        ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:169:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        m_frameBufferCache.grow(m_dirEntries.size());
        ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:200:45: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            m_bmpReaders[index]->setBuffer(&m_frameBufferCache[index]);
                                            ^
../../Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:216:5: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    m_frameBufferCache[index] = *m_pngDecoders[index]->frameBufferAtIndex(0);
    ^
13 warnings generated.
[7/87] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/image-decoders/png/PNGImageDecoder.cpp.o
In file included from ../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:42:
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:78:17: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            if (m_frameBufferCache.isEmpty())
                ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:81:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            for (auto& imageFrame : m_frameBufferCache) {
                                  ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:81:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:91:29: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            return (index < m_frameBufferCache.size() && m_frameBufferCache[index].isComplete());
                            ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h:91:58: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            return (index < m_frameBufferCache.size() && m_frameBufferCache[index].isComplete());
                                                         ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:264:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    if (m_frameBufferCache.isEmpty())
        ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:265:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        m_frameBufferCache.grow(1);
        ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:267:19: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    auto& frame = m_frameBufferCache[index];
                  ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:450:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    if (m_frameBufferCache.isEmpty())
        ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:458:20: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    auto& buffer = m_frameBufferCache[m_currentFrame];
                   ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:577:10: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    if (!m_frameBufferCache.isEmpty())
         ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:578:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        m_frameBufferCache.first().setDecodingStatus(DecodingStatus::Complete);
        ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:620:13: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        if (m_frameBufferCache.size() == m_frameCount)
            ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:623:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        m_frameBufferCache.resize(m_frameCount);
        ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:665:13: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        if (m_frameBufferCache.isEmpty())
            ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:666:13: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            m_frameBufferCache.grow(1);
            ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:668:30: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        if (m_currentFrame < m_frameBufferCache.size()) {
                             ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:669:28: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
            auto& buffer = m_frameBufferCache[m_currentFrame];
                           ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:756:9: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    if (m_frameBufferCache.isEmpty())
        ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:760:51: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    clearBeforeFrame = std::min(clearBeforeFrame, m_frameBufferCache.size() - 1);
                                                  ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:761:59: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    const Vector<ScalableImageDecoderFrame>::iterator end(m_frameBufferCache.begin() + clearBeforeFrame);
                                                          ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:764:18: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    for (; (i != m_frameBufferCache.begin()) && (i->isInvalid() || (i->disposalMethod() == ScalableImageDecoderFrame::DisposalMethod::RestoreToPrevious)); --i) {
                 ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:770:56: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    for (Vector<ScalableImageDecoderFrame>::iterator j(m_frameBufferCache.begin()); j != i; ++j) {
                                                       ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:782:20: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    auto& buffer = m_frameBufferCache[frameIndex];
                   ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:792:31: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    const auto* prevBuffer = &m_frameBufferCache[--frameIndex];
                              ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:795:23: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
        prevBuffer = &m_frameBufferCache[--frameIndex];
                      ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:842:20: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
    auto& buffer = m_frameBufferCache[m_currentFrame];
                   ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:880:43: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
                const auto* prevBuffer = &m_frameBufferCache[--frameIndex];
                                          ^
../../Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:882:35: warning: reading variable 'm_frameBufferCache' requires holding mutex 'm_lock' [-Wthread-safety-analysis]
                    prevBuffer = &m_frameBufferCache[--frameIndex];
                                  ^
29 warnings generated.

-- 
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/20210615/06864b5f/attachment-0001.htm>


More information about the webkit-unassigned mailing list