You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the test case cs_tests/cs21.c, I believe the assertion MUSTALIAS inside the function foo should be only MAYALIAS.
This is because the function foo is non-terminating in the if-then case (in the function call foo(z): z==x).
Hence, the return statement can never be reached, therefore, we cannot say that y and &a are must-alias.
Could you advise if my understanding is correct?
// cs_tests/cs21.c
#include "aliascheck.h"
int a;
int *foo(int *x){
int*z = x;
int* y;
if(x)
y = foo(z);
else
y = x;
MUSTALIAS(y,&a); // this should be MayAlias, since `foo` is non-terminating in the if-then case.
return y;
}
int main(){
int*p;
p = &a;
foo(p);
}
The text was updated successfully, but these errors were encountered:
Hi,
For the test case
cs_tests/cs21.c
, I believe the assertionMUSTALIAS
inside the functionfoo
should be onlyMAYALIAS
.This is because the function
foo
is non-terminating in theif-then
case (in the function callfoo(z)
:z==x
).Hence, the
return
statement can never be reached, therefore, we cannot say thaty
and&a
are must-alias.Could you advise if my understanding is correct?
The text was updated successfully, but these errors were encountered: