Bug 186800 - [WTF] Coverity scan issues
Summary: [WTF] Coverity scan issues
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tomas Popela
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-19 01:47 PDT by Tomas Popela
Modified: 2018-07-26 02:02 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.23 KB, patch)
2018-06-19 01:50 PDT, Tomas Popela
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.02 MB, application/zip)
2018-06-19 05:34 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews200 for win-future (12.95 MB, application/zip)
2018-06-19 13:39 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Popela 2018-06-19 01:47:14 PDT
Error: SWAPPED_ARGUMENTS (CWE-683):
webkitgtk-2.20.3/Source/WTF/wtf/CheckedArithmetic.h:420: swapped_arguments: The positions of arguments in the call to "multiply" do not match the ordering of the parameters:
* "rhs" is passed to "lhs"
* "lhs" is passed to "rhs"
webkitgtk-2.20.3/Source/WTF/wtf/CheckedArithmetic.h:391:5: param_names: The parameters are called: "lhs", "rhs" and "result".
#  418|       static inline bool multiply(int64_t lhs, int64_t rhs, ResultType& result)
#  419|       {
#  420|->         return ArithmeticOperations<int, unsigned, ResultType>::multiply(rhs, lhs, result);
#  421|       }
#  422|   

Error: UNINIT_CTOR (CWE-456):
webkitgtk-2.20.3/Source/WTF/wtf/ThreadSpecific.h:125: member_decl: Class member declaration for "m_key".
webkitgtk-2.20.3/Source/WTF/wtf/ThreadSpecific.h:167: uninit_member: Non-static class member "m_key" is not initialized in this constructor nor in any functions that it calls.
#  165|       if (error)
#  166|           CRASH();
#  167|-> }
#  168|   
#  169|   template<typename T, CanBeGCThread canBeGCThread>

Error: UNINIT_CTOR (CWE-456):
webkitgtk-2.20.3/Source/WTF/wtf/dtoa.cpp:363: member_decl: Class member declaration for "next".
webkitgtk-2.20.3/Source/WTF/wtf/dtoa.cpp:361: uninit_member: Non-static class member "next" is not initialized in this constructor nor in any functions that it calls.
#  359|       WTF_MAKE_NONCOPYABLE(P5Node); WTF_MAKE_FAST_ALLOCATED;
#  360|   public:
#  361|->     P5Node() { }
#  362|       BigInt val;
#  363|       P5Node* next;
Comment 1 Tomas Popela 2018-06-19 01:50:26 PDT
Created attachment 343031 [details]
Patch
Comment 2 EWS Watchlist 2018-06-19 05:34:21 PDT
Comment on attachment 343031 [details]
Patch

Attachment 343031 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/8246345

New failing tests:
accessibility/mac/selection-notification-focus-change.html
Comment 3 EWS Watchlist 2018-06-19 05:34:22 PDT
Created attachment 343049 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 4 Alexey Proskuryakov 2018-06-19 05:45:04 PDT
Comment on attachment 343031 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=343031&action=review

> Source/WTF/ChangeLog:3
> +        [WTF] Coverity scan issues

Does this fix any bugs?
Comment 5 EWS Watchlist 2018-06-19 13:39:32 PDT
Comment on attachment 343031 [details]
Patch

Attachment 343031 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/8251036

New failing tests:
http/tests/preload/onload_event.html
Comment 6 EWS Watchlist 2018-06-19 13:39:43 PDT
Created attachment 343091 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 7 Tomas Popela 2018-06-26 00:48:15 PDT
(In reply to Alexey Proskuryakov from comment #4)
> Does this fix any bugs?

Nothing that I'm aware of. But potentially the uninitialized variables could cause something.
Comment 8 Brent Fulgham 2018-07-25 09:22:56 PDT
Comment on attachment 343031 [details]
Patch

This seems very reasonable. r=me. I don't see how the Windows test could be related to these safe changes.
Comment 9 Tomas Popela 2018-07-26 02:00:15 PDT
Comment on attachment 343031 [details]
Patch

Clearing flags on attachment: 343031

Committed r234251: <https://trac.webkit.org/changeset/234251>
Comment 10 Tomas Popela 2018-07-26 02:00:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-07-26 02:02:29 PDT
<rdar://problem/42616736>