Frage

Is there a simple way to take the general arguments of a function (Pointer, Array, Integer) and get the values backing the expression, when writing a custom checker? As in, I match against a function such as:

Pointer p;

Integer i;

CallSite f("func");

if(MATCH( f(p,i) ))
   //get function arguments

Is there a simple way of getting the values backing p and i? Thanks.

**Language is C++ to make a custom checker

War es hilfreich?

Lösung

There is no way to get run-time value from these variables statically.

Maybe it's more accurate to say that this is beyond the scope of what a simple static analysis checker can do.

The exception would be if you are passing a literal value or constant.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top