SVF icon indicating copy to clipboard operation
SVF copied to clipboard

Faced a crash on saber

Open tangken333 opened this issue 10 months ago • 7 comments

Faced a crash while running the saber for a llvm-15 IR. 1713363119605

The IR file is attached. Uploading zkevm_circuits-039281c79cc41144.ll.zip…

tangken333 avatar Apr 17 '24 14:04 tangken333

Are you using the latest SVF? If so, please use llvm-16 to compile your bc.

yuleisui avatar Apr 17 '24 14:04 yuleisui

Thanks for the reply! Maybe I can not change the bc, is there any LLVM-15 version for SVF that I can use?

tangken333 avatar Apr 17 '24 15:04 tangken333

SVF-1.9 works for llvm-14

yuleisui avatar Apr 17 '24 19:04 yuleisui

Dear Sir,

I used the LLVM-16 to build my IR again but still faced this problem. It seems that it is not a version problem. I upload my bc here. Thanks! zkevm_circuits-8a1cfd59e298339f.ll.zip

tangken333 avatar Apr 27 '24 11:04 tangken333

@jumormt you could take a look at this? It might because of missing a pag edge during svfir builder

yuleisui avatar Apr 27 '24 11:04 yuleisui

The bug is caused by trying connecting a direct value-flow from an integer to pointer (int2ptr instruction) when building a PTR only value flow graph. The source PAGNode (integer) does not have a definition on PTROnly SVFG, which raises the assertion. A possible solution is to check whether the source and destination PAG Node are both pointers when constructing PTROnly SVFG. @yuleisui @tangken333

jumormt avatar Apr 28 '24 02:04 jumormt

The bug is caused by trying connecting a direct value-flow from an integer to pointer (int2ptr instruction) when building a PTR only value flow graph. The source PAGNode (integer) does not have a definition on PTROnly SVFG, which raises the assertion. A possible solution is to check whether the source and destination PAG Node are both pointers when constructing PTROnly SVFG. @yuleisui @tangken333

Thanks for your help! I will try it again.

tangken333 avatar Apr 29 '24 05:04 tangken333