Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AV: Deadcode detection not working for null test after deref #39

Open
shaobo-he opened this issue Feb 1, 2017 · 1 comment
Open

AV: Deadcode detection not working for null test after deref #39

shaobo-he opened this issue Feb 1, 2017 · 1 comment

Comments

@shaobo-he
Copy link
Collaborator

Consider the following program:

struct X {int* p;};

int foo(struct X* x)
{
  int a = x->p;
  if (!x)
    return -1;
  else
    return a;
}

AV does not detect deadcode of the if branch given the blocking condition x != NULL because we disable the assertion assert x != NULL into assume x != NULL when checking inconsistency. The reachability angelic assertion is proved at the beginning therefore the consistency will trivially hold.

To reproduce this issue, please try,
avh null-test-before-deref-null.inst.bpl hinst.bpl /entryPointProc:foo /unknownProc:malloc /unknownProc:$alloc /killAfter:1000 /noAA /deadCodeDetection
avn hinst.bpl /sdv /timeoutEE:200 /timeout:1000 /noEbasic /EE:ignoreAllAssumes+ /dontGeneralize /dumpResults:results.txt /EE:onlySlicAssumes+ /EE:ignoreAllAssumes- /killAfter:3600

shaobo-he added a commit that referenced this issue Feb 1, 2017
@zvonimir
Copy link
Collaborator

I am guessing nobody will work on this any time soon, if ever.
@shuvendu-lahiri and @akashlal : are you ok if I mark this as "won't fix" and close the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants