Bug 202160

Summary: Address static analyzer warnings in DFGSpeculativeJIT64.cpp, FTLLowerDFGToB3.cpp: 1st function call argument is an uninitialized value
Product: WebKit Reporter: Keith Rollin <krollin>
Component: JavaScriptCoreAssignee: Keith Rollin <krollin>
Status: RESOLVED LATER    
Severity: Normal CC: bfulgham, ews-watchlist, fpizlo, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Keith Rollin
Reported 2019-09-24 12:52:58 PDT
Xcode's static analyzer reports many possible issues like the following: .../OpenSource/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:2999:13: warning: 1st function call argument is an uninitialized value m_jit.add32(argGPRs[0], newValueGPR); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../OpenSource/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:3668:27: warning: 1st function call argument is an uninitialized value atomicValue = m_out.atomicXchgAdd(args[0], pointer, width); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are false positives. The static analyzer things that argGPRs[0] or args[0] might not be initialized if a certain loop variable happens to be zero. However, the static analyzer doesn't realize that, at any time those array elements are accessed, that loop variable will not be zero. Therefore, the access are OK. Assure the static analyzer of this with some ASSERTs saying that the loop variable is not zero.
Attachments
Patch (5.85 KB, patch)
2019-09-24 12:55 PDT, Keith Rollin
no flags
Radar WebKit Bug Importer
Comment 1 2019-09-24 12:53:09 PDT
Keith Rollin
Comment 2 2019-09-24 12:55:44 PDT
Alexey Proskuryakov
Comment 3 2025-01-29 13:18:59 PST
Closing this 5+ years later, as it's an abandoned patch.
Note You need to log in before you can comment on or make changes to this bug.