Hi Keith,

>  We originally started looking at LCLint because of a problem we have
>  with database locks and cache pages.  We need some way to statically
>  check our C code to ensure that when we acquire a lock or a cache page,
>  it is released, even if we follow an error path in the code.
>  

Depending on how you acquire the locks, you should be able to do that
with lclint.  Suppose you have,

        typedef /*@abstract@*/ struct ... *lock;

        /*@only@*/ lock acquireLock (...);
        void releaseLock (/*@only@*/ lock);

Then, lclint would report a warning if a lock returned by acquireLock is
not passed to releaseLock before its reference is lost on any code path.

--- Dave

Reply via email to