<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Martin, What tool are you using for this code scan - we're not<br>getting these "soc issues" flagged, using Klocwork Static Code<br>Analysis tool?<br>We are getting different "warnings" in chip.c and gspi.c files.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">These are generated using clang's scan-build tool:<br>https://clang-analyzer.llvm.org/scan-build.html</p><p style="white-space: pre-wrap; word-wrap: break-word;">We also run coverity's stataic analysis on a bi-weekly basis.  That output is here:<br>https://scan.coverity.com/projects/coreboot?tab=overview<br>That finds still different issues in soc/intel.</p><p><a href="https://review.coreboot.org/28060">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://review.coreboot.org/#/c/28060/1/src/soc/intel/common/block/cpu/mp_init.c">File src/soc/intel/common/block/cpu/mp_init.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/28060/1/src/soc/intel/common/block/cpu/mp_init.c@137">Patch Set #1, Line 137:</a> <code style="font-family:monospace,monospace">assert</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Links are downstream buses attached to the device as: […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It will only avoid the null pointer being dereferenced *IF* fatal asserts are turned on.  Typically, as I said, asserts in coreboot are non-fatal, so the NULL pointer *WILL* still be dereferenced.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Think of assert in the coreboot codebase as a printk that gets output if the assert fails.  Since they are non-fatal, the code still runs beyond this.</p><p style="white-space: pre-wrap; word-wrap: break-word;">https://review.coreboot.org/cgit/coreboot.git/tree/src/Kconfig#n691</p><p style="white-space: pre-wrap; word-wrap: break-word;">https://review.coreboot.org/cgit/coreboot.git/tree/src/include/assert.h#n34</p></li></ul></li></ul><p>To view, visit <a href="https://review.coreboot.org/28060">change 28060</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/28060"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I5e7caa15a3911e05ff346d338493673af5318a51 </div>
<div style="display:none"> Gerrit-Change-Number: 28060 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: John Zhao <john.zhao@intel.com> </div>
<div style="display:none"> Gerrit-Reviewer: John Zhao <john.zhao@intel.com> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-CC: AndreX Andraos <andrex.andraos@intel.com> </div>
<div style="display:none"> Gerrit-CC: Martin Roth <martinroth@google.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 13 Aug 2018 22:21:06 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>