[cfe-dev] Allowing checkers to mark symbols as live
Zhongxing Xu
xuzhongxing at gmail.com
Mon Aug 9 21:09:34 PDT 2010
On Tue, Aug 10, 2010 at 11:43 AM, Ted Kremenek <kremenek at apple.com> wrote:
> On Aug 9, 2010, at 7:17 PM, Zhongxing Xu wrote:
>
> I'm inclined to Jordy's original proposal that Checkers should be able
> to control some symbols that only they know what the symbol means,
> when the symbol dies.
>
> My point was that the checker shouldn't have to do anything special to
> extend the lifetime of a symbol. For symbols that annotate MemRegions, the
> lifetime of the symbol is inherently bound to the lifetime of the MemRegion.
> It seems far more natural to me, more efficient, and far less error prone
> to have SymbolManager::isLive() understand that the lifetime of one symbol
> is tied to another (declaratively) then having the checker doing something
> ad hoc on the side.
>
Make sense. I overlooked the fact that checkers alone can't decide the
liveness of a symbol. Then some kind of derived symbol is justified.
To keep symbols immutable, checkers need to make multiple symbols.
SymbolReaper needs a way to recognize the 'current' symbol.
More information about the cfe-dev
mailing list