[cfe-dev] [Analyzer] Does SymbolicRegion preserve the structure of its associated memory?

scott constable via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 24 13:59:43 PDT 2015


Hi All,

Suppose I'm analyzing the following code:

struct MyStruct {
  int a;
  int b;
  int c;
};

void foo(MyStruct &s) {
  ...
}

Furthermore, suppose that I would like to annotate s.b's memory in the
program state, without also annotating s.a and s.c. When I retrieve the
region referenced by s, I observe that it is a SymbolicRegion, which is to
be expected. I cannot, however, see any way to reason about any of its
SubRegions individually, in this case s.a, s.b, and s.c.

I understand that SymbolicRegions are supposed to represent memory regions
whose values the analyzer cannot properly model. But it still should be
able to recognize that from foo's point of view, s has a well-defined
structure with three FieldRegions, though their values must be symbolic.

Any help would be very much appreciated.

~Scott Constable
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150824/6cf139eb/attachment.html>


More information about the cfe-dev mailing list