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
Can the code above solve the same issue when multiple basic blocks are located in the same line?
I tested it on my c code below, but aflgo can not allocate different names to the 3 different basic blocks in line 24.(ret = a>b?1:(a==b?11:34);)
I think the BB.setValueName(ValueName::Create(NameRef, Allocator)); doesn't work.
#include<stdio.h>
void vul(int x){
int a=1;
printf("this is vul(%d)\n", x+a);
}
int normal(int x){
printf("this is normal()\n");
if(x%2==0){
vul(x*2);
}
return x+1;
}
void irrelavent(){
printf("this is irrelavent function\n");
}
int main(int argc, char** argv){
int a=1,b=3,ret=0;
irrelavent();
irrelavent();
ret=normal(a+1);
ret = a>b?1:(a==b?11:34);
if(ret%2==0){
vul(ret);
}
else{
vul(ret+3);
}
if(ret%2==0){
irrelavent();
}
else{
irrelavent();
}
return 0;
}
Can the code above solve the same issue when multiple basic blocks are located in the same line?
I tested it on my c code below, but aflgo can not allocate different names to the 3 different basic blocks in line 24.(
ret = a>b?1:(a==b?11:34);
)I think the
BB.setValueName(ValueName::Create(NameRef, Allocator));
doesn't work.the corresponding dot file is
thanks for any help
The text was updated successfully, but these errors were encountered: