Hello,

I am very interested in trying to use the Dehydra static-analysis plugin for 
GCC 4.5 to implement some enforcement of the safe memory management classes 
described here:

    http://www.cs.sandia.gov/~rabartl/TeuchosMemoryManagementSAND.pdf

Basically, I want to be able to turn on a mode on in the code where the custom 
static analysis tool (that I will write with Dehyra) where all raw pointers 
will not be allowed, or it will be an error.  However, there will likely be 
places where a raw pointer will need to be exposed for a short period of time.  
In this cases I would like to be able to temporarily turn off the the checking 
and then turn it back on again.

The problem is that I don't see a way to do this with Dehydra given what is 
documented at:

    https://developer.mozilla.org/en/Dehydra

I would like to use something like a pragma or something but it does not look 
like that info is given in the parse tree.  Otherwise, I don't know how I can 
do this.

Also, I would need ways to detect when a raw pointer was exposed in a direct 
function call such as with:

    someFuncTakingRawPtr(  someFuncReturningRawPtr(...) );

It does not look like Dehydra exposes temporary variables that are managed by 
the compiler.

I guess that I need to get the Dehydra plug-inn working with GCC 4.5 and see 
what kinds of info it does actually spit out.  Perhaps it already returns 
temporary objects from function calls?

Thanks,

- Ross


-----------------------------------------------------------------------
Dr. Roscoe A. Bartlett
Sandia National Laboratories
Department of Optimization and Uncertainty Estimation
Trilinos Software Engineering Technologies and Integration Lead
(505) 844-5097



_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to