<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61515>61515</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang Static Analyzer "core.NullDereference" false negative
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
BalladeNo1InGMinorOp23
</td>
</tr>
</table>
<pre>
Ubuntu 18.04 Clang-10
clang --analyze --analyzer-no-default-checks -Xanalyzer -analyzer-checker=core.NullDereference -Xanalyzer -analyzer-output=text 1.c
I design an algorithm that can automatically and randomly generate diverse, complex programs containing specified defects, attempting to test for false positives and false positives in static analysis tools.
The loop-free test cases are generated for testing the null pointer dereference checker (core.NullDereference). These test cases have only one execution path to trigger the bug and ensure no other pointer-related defects within the program.(That is, pointer-related bugs on other paths reported by the tool can be considered false positives.)
I select several test cases where the static checker fails to detect defects as follows:
[testcase1.zip](https://github.com/llvm/llvm-project/files/11011225/testcase1.zip)
And the following is an example of that CSA can detect the inserted null pointer dereference bug and output bug paths:
[testcase2.zip](https://github.com/llvm/llvm-project/files/11011303/testcase2.zip)
I want to confirm whether my test cases are within the tool's scope (such as parameter restrictions, etc.) and whether my test cases can help identify possible issues within the tool.
This is my first posting. If I need to add additional information, please remind me.
Thanks for your help!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVU2P4zYP_jXKhYhhy_k8-DC7QV7M4d0edgr0yki0ra4sGRI9M9lfX0iOO-k0PRToIY5tmRSfD1IYo-kcUSO2X8T2tMKJex-aL2gtavrmq2f3v_8b58Mvo6xXF6-vza-XyfEE1aEoN_DVouvWVSnKkyifVHqC9Rod2utP-rgLa-fXmlqcLK9VT-pHhPVvyyJ8fJbXKIj6pHyg4ttk7YkCtRTIKXoc4yceJxb1iemdoSrUXMx8fQZNCSKgA7SdD4b7AbhHBpVeTewHZKPQ2iug0xDQaT_YK3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