[cfe-commits] [PATCH] Set region size in GRRegionVals transfer function

Zhongxing Xu xuzhongxing at gmail.com
Wed Nov 5 03:33:43 PST 2008

The first step of checking out of bound array references is to get the size
of a memory region. In this patch I store the size of MemRegions with the
GDM facility of GRState. I put this data into a new transfer function called
GRRegionVals. GRRegionVals is intended to be used with the RegionStore when
we want to check some properties enabled by RegionStore, for example, out of
bound array references and memory leak. For memory leaks we need another
piece of GDM to store the state of heap regions.

I can think of no where to put this piece of data in current components.
Store only manages the mapping from region to value. Other components should
not manage this region-store specific data. So I made a new transfer
function for it.

Later in this new GRRegionVals we can add an EvalLocation() method to check
for out-of-bound array references and other region-store enabled memory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081105/e74a9ad1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grregionvals.patch
Type: application/octet-stream
Size: 2662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20081105/e74a9ad1/attachment.obj>

More information about the cfe-commits mailing list