symbiotic icon indicating copy to clipboard operation
symbiotic copied to clipboard

symbiotic problem when argv and argc is used

Open dkozovsk opened this issue 7 years ago • 2 comments

When I use symbiotic with option --prp=memsafety on this code:

int main (int argc, char *argv[])
{ 
   if (argc > 0)
      printf("%s\n",argv[0]);
   return 0;
}

it returns: Error found. RESULT: false(valid-deref)

On the other hand if I run symbiotic also with --prp=memsafety on this code:

int main (int argc, char *argv[])
{ 
   if (argc == 2)
      printf("%s\n",argv[5]);
   return 0;
}

it returns: No error found. RESULT: true

dkozovsk avatar Dec 06 '18 11:12 dkozovsk

I cannot reproduce the first one, but I can reproduce the latter one. What version of Symbiotic did you use? By the way, may I add these code snippets as tests?

Thanks, Marek

mchalupa avatar Dec 06 '18 11:12 mchalupa

I used symbiotic-5.0.1 and of course you can use that code as you like

dkozovsk avatar Dec 06 '18 11:12 dkozovsk