[klee-dev] Please help me figure out what is happening in External Dispatcher

Chace Clark chace3 at tamu.edu
Fri Apr 10 18:28:27 BST 2015


I am trying to figure out why some of my calls to external functions are
producing odd behaviors. Its like some functions are leaving things on the
stack.
For example when I run my version of KLEE on:

void main(){
  printf("hi\n");
  int haspwd = strncmp("a", "PWD=", 4)==0;
  printf("bye\n");
}
it produces:
hi
abye

Very strange for the strncmp argument to be printed. So I am trying to
debug this issue.

Anyway, my question is this... how are the parameters passed to the
function in ExternalDispatcher.cpp

I am looking at runProtectedCall which seems to handle this. the line in
particular
executionEngine->runFunction(f, gvArgs);

however gvArgs is always empty. additionally the klee warning messages
provide some arguments but these dont match the values in the uint64_t
*args.

Basically I am trying to print the arguments right before the call to the
runFunction

I want to determine if the arguments passed are corrupt somehow.

Any help or ideas you can provide will be greatly appreciated.

Thank you.
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list