We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
path_tests/path1.c
Hi,
For the test case path_tests/path1.c, I think the two assertions MUSTALIAS(c,&e) and MUSTALIAS(d,&f) could not hold together.
MUSTALIAS(c,&e)
MUSTALIAS(d,&f)
I'm not sure how to evaluate the condition if (x), when x is declared by int **x.
if (x)
x
int **x
But, if x is considered a valid memory address (not NULL), then only the then branch is executed, hence the second assertion should be NOALIAS(d, &f).
then
NOALIAS(d, &f)
If x is considered an arbitrary value, then both the two branches then and else could be executed, hence, the two assertions should both be MAYALIAS.
else
MAYALIAS
Could you advise if my understanding is correct?
Thank you!
// path_tests/path1.c #include "aliascheck.h" void foo(int**, int*); main(){ int **x, *y; int *c, *d,e,f; if(x) { x =&c; y =&e;} else { x= &d; y = &f;} foo(x,y); MUSTALIAS(c,&e); MUSTALIAS(d,&f); NOALIAS(c,&f); NOALIAS(d,&e); } void foo(int **p, int *q){ *p = q; }
The text was updated successfully, but these errors were encountered:
Correct. MAYALIAS is appropriate. Just fixed
Sorry, something went wrong.
No branches or pull requests
Hi,
For the test case
path_tests/path1.c
, I think the two assertionsMUSTALIAS(c,&e)
andMUSTALIAS(d,&f)
could not hold together.I'm not sure how to evaluate the condition
if (x)
, whenx
is declared byint **x
.But, if
x
is considered a valid memory address (not NULL), then only thethen
branch is executed, hence the second assertion should beNOALIAS(d, &f)
.If
x
is considered an arbitrary value, then both the two branchesthen
andelse
could be executed, hence, the two assertions should both beMAYALIAS
.Could you advise if my understanding is correct?
Thank you!
The text was updated successfully, but these errors were encountered: