[Webkit-unassigned] [Bug 196855] Fix Covscan uninitialized after ctor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 12 16:28:11 PDT 2019


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

--- Comment #22 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to Alexey Proskuryakov from comment #21)
> The code is actually correct. The first time this function is called,
> m_cachedImage is null, so the rest of the expression is not evaluated (it's
> called short-circuiting logical operators in C++).

Ah, you are right, of course. It is subtle and very fragile, though. I wouldn't want to leave a footgun like that in WebKit. Programming is just too hard if we can't count on the data members of a class to be initialized.

-- 
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/20190412/dc0ed916/attachment-0001.html>


More information about the webkit-unassigned mailing list