[cfe-commits] r74407 - in /cfe/trunk/lib/Analysis: BasicStore.cpp RegionStore.cpp
kremenek at apple.com
Wed Jul 1 16:47:30 CDT 2009
On Jun 30, 2009, at 7:26 PM, Zhongxing Xu wrote:
> int *p = 0x1111;
> *p = 3;
Hmm. I ran this test case through clang-cc running in gdb and
couldn't get either 'return' site in BasicStore.cpp/RegionStore.cpp to
hit using this test case.
> But I haven't saw it in real code. So I didn't add a test case.
I think we need a test case for this one. Even if it doesn't happen
in real code, the analyzer should gracefully handle even weird code
(even if the analyzer doesn't do something smart). In this case you
were fixing a crash, so having a test case is just good so that it
cannot possibly surprise us later if we regress on handling it
> you suggest before, such cases should be handled in evalLocation for
> null pointer check.
Sure, but that is something we can change later. Since the logic is
already in the tree, we should have a test case for it.
> On Wed, Jul 1, 2009 at 3:47 AM, Ted Kremenek<kremenek at apple.com>
>> Hi Zhongxing,
>> Do you have a test case to accompany this patch that can go in the
>> suite? It's not 100% clear to me how this gets triggered.
>> On Jun 28, 2009, at 3:16 AM, Zhongxing Xu wrote:
>>> Author: zhongxingxu
>>> Date: Sun Jun 28 05:16:11 2009
>>> New Revision: 74407
>>> URL: http://llvm.org/viewvc/llvm-project?rev=74407&view=rev
>>> Do not crash on binding concrete integer location.
More information about the cfe-commits