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

Assertion when using SVF on Ceph #1392

Closed
Louise4one opened this issue Mar 5, 2024 · 7 comments · Fixed by #1412
Closed

Assertion when using SVF on Ceph #1392

Louise4one opened this issue Mar 5, 2024 · 7 comments · Fixed by #1412

Comments

@Louise4one
Copy link

I tried to use SVF on Ceph (version 18.2.1). First I used WLLVM (LLVM version 16.0.0, Clang version 10.0.0) to generate Ceph bitcode, then I wanted to run wpa on Ceph RGW. But I countered with assertion below:

 /ceph/build/bin# wpa -ander radosgw.bc
wpa: /SVF/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/include/llvm/IR/Function.h:785: llvm::Argument* llvm::Function::getArg(unsigned int) const: Assertion `i < NumArgs && "getArg() out of range!"' failed.
Aborted (core dumped)

I think it might be an unavoidable warning if SVF is used on such complex project, so I just ignored it. Then another assertion came out:

/ceph/build/bin# wpa -ander radosgw.bc
wpa: /SVF/svf/include/Util/Casting.h:198: static bool SVF::SVFUtil::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::GetElementPtrInst; From = llvm::Value]: Assertion `Val && "SVFUtil::isa<> used on a null pointer"' failed.
Aborted (core dumped)

What leads to this assertion? Should I ignored this one again? If not, how can I solve this problem?

By the way, I tried to turn off all assertions in SVF and ran Ceph RGW again. However, segmentation fault happened this time, and the gdb information was:

(gdb) bt
#0  0x000055c105a75391 in SVF::ObjTypeInference::fwInferObjType(llvm::Value const*) ()
#1  0x000055c105a89116 in SVF::SymbolTableBuilder::inferTypeOfHeapObjOrStaticObj(llvm::Instruction const*) ()
#2  0x000055c105a8ac3d in SVF::SymbolTableBuilder::createObjTypeInfo(llvm::Value const*) ()
#3  0x000055c105a8b3ad in SVF::SymbolTableBuilder::collectObj(llvm::Value const*) ()
#4  0x000055c105a8be18 in SVF::SymbolTableBuilder::buildMemModel(SVF::SVFModule*) ()
#5  0x000055c105a525fe in SVF::LLVMModuleSet::buildSymbolTable() const ()
#6  0x000055c105a6284e in SVF::LLVMModuleSet::buildSVFModule(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#7  0x000055c10593aa9f in main ()

How can I solve the problem?

@yuleisui
Copy link
Collaborator

yuleisui commented Mar 5, 2024

@jumormt could you take a look at this issue?

@yuleisui
Copy link
Collaborator

yuleisui commented Mar 5, 2024

@Louise4one would you upload the bc file and also give the debug trace of your stack?

@yuleisui
Copy link
Collaborator

yuleisui commented Mar 8, 2024

@Louise4one could you upload your bc or provide a link where we could download or compile?

@Louise4one
Copy link
Author

@Louise4one could you upload your bc or provide a link where we could download or compile?

GitHub doesn't support bitcode file type, I put it in the zip file. But the file size is still over the limit of GitHub. I found your unsw e-mail on the internet. I deliver the bitcode file via e-mail, named with GitHub SVF issues #1392.

@Louise4one
Copy link
Author

I have pulled the latest version of SVF and ran wpa on the same radosgw.bc again. However it ends up in another assertion:

wpa: /SVF/svf-llvm/lib/LLVMModule.cpp:1275: SVF::SVFConstantData* SVF::LLVMModuleSet::getSVFConstantData(const ConstantData*): Assertion false && "Unsupported floating point type"' failed.`

@yuleisui
Copy link
Collaborator

@bjjwwang could you fix this? It is caused by recent floating point handling in AE

@yuleisui
Copy link
Collaborator

Should have just been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants