[Webkit-unassigned] [Bug 229461] New: [clang static analyzer] Ignore static analyzer warnings about nullptr derefs in WTF::StringImpl::copyCharacters() and WTF::StringTypeAdapter::writeTo()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 24 11:55:20 PDT 2021


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

            Bug ID: 229461
           Summary: [clang static analyzer] Ignore static analyzer
                    warnings about nullptr derefs in
                    WTF::StringImpl::copyCharacters() and
                    WTF::StringTypeAdapter::writeTo()
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: achristensen at apple.com, ap at webkit.org,
                    bfulgham at webkit.org, cdumez at apple.com, darin at apple.com
        Depends on: 229127

Ignore static analyzer warnings about nullptr derefs in WTF::StringImpl::copyCharacters() and WTF::StringTypeAdapter::writeTo().

A nullptr deref here will simply crash, and we don't know of any such issues in practice.

Adding a Debug ASSERT() causes the clang static analyzer to assume the `destination` argument is never nullptr.

I considered adding something like a CLANG_STATIC_ANLYZER_ASSERT() that's only active on static analyzer runs (not even in Debug builds), but wasn't sure if that's something folks are agreeable to, or whether it's too similar in name to `static_assert()`.


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=229127
[Bug 229127] "make analyze" should run clang static analyzer in deep mode
-- 
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/20210824/44c140fd/attachment-0001.htm>


More information about the webkit-unassigned mailing list