Re: [Gc] Boehm GC and Splint

Ivan Maidanski ivmai at mail.ru
Tue Aug 2 02:19:31 PDT 2011


Hi Andrew,

It's unclear to me what are you going to do? If you are using GC_malloc then it shouldn't cause memory leaks (unless you hide pointers).
And, what annotations do you expect from GC_malloc? GC_malloc already has some annotations informing GCC that result is non-aliased and that result's size is as specified by the argument.

Regards.

01 08 2011, 23:23 Andrew Pennebaker <andrew.pennebaker at gmail.com>:
> Splint (http://www.splint.org/) is a static code analyzer for C. Perhaps its
> chief feature is its ability to track down sources of memory leaks.
> 
> Splint knows every malloc() should have a matching free(). Obviously, it has
> trouble reasoning about GC_MALLOC().
> 
> Does anyone know how to properly annotate code for Splint so that it ignores
> apparent memory leaks caused by Boehm GC code?
> 
> In particular, could someone offer an annotated version of the Wikipedia
> Boehm GC example that does this?
> 
> http://en.wikipedia.org/wiki/Boehmgc#Example
> 
> Cheers,
> 
> Andrew Pennebaker
> www.yellosoft.us
> 
> 



More information about the Gc mailing list