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

Faced a crash on saber #1437

Closed
tangken333 opened this issue Apr 17, 2024 · 7 comments
Closed

Faced a crash on saber #1437

tangken333 opened this issue Apr 17, 2024 · 7 comments
Labels

Comments

@tangken333
Copy link

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

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

@yuleisui
Copy link
Collaborator

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

@tangken333
Copy link
Author

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

@yuleisui
Copy link
Collaborator

SVF-1.9 works for llvm-14

@tangken333
Copy link
Author

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

@yuleisui
Copy link
Collaborator

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

@yuleisui yuleisui added the bug label Apr 27, 2024
@jumormt
Copy link
Contributor

jumormt commented Apr 28, 2024

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 added a commit to jumormt/SVF-xiao that referenced this issue Apr 28, 2024
@tangken333
Copy link
Author

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.

@yuleisui yuleisui closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants