Comments (9)
You can use wllvm or gllvm to extract the linked bitcode of the codebase.
from svf.
Thanks! I used wllvm and I am able to generate the LLVM IR files.
When I try to analyze any of the .bc files, I run into this error:
hpatel@genela-Precision-7960-Tower:~/code/srsRAN_Project/build$ ../../SVF/Debug-build/bin/wpa -ander apps/gnb/CMakeFiles/gnb.dir/.gnb.cpp.o.bc
wpa: /home/hpatel/code/SVF/svf-llvm/lib/CHGBuilder.cpp:520: void SVF::CHGBuilder::analyzeVTables(const Module&): Assertion `opcode == Instruction::IntToPtr' failed.
Aborted (core dumped)
Here's a backtrace from gdb if it helps:
(gdb) r -ander apps/gnb/CMakeFiles/gnb.dir/.gnb.cpp.o.bc
Starting program: /home/hpatel/code/SVF/Debug-build/bin/wpa -ander apps/gnb/CMakeFiles/gnb.dir/.gnb.cpp.o.bc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
wpa: /home/hpatel/code/SVF/svf-llvm/lib/CHGBuilder.cpp:520: void SVF::CHGBuilder::analyzeVTables(const Module&): Assertion `opcode == Instruction::IntToPtr' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff0e969fc in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff0e969fc in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff0e42476 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff0e287f3 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff0e2871b in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007ffff0e39e96 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x00005555556375e3 in SVF::CHGBuilder::analyzeVTables (this=0x7fffffffe0d8, M=...)
at /home/hpatel/code/SVF/svf-llvm/lib/CHGBuilder.cpp:520
#6 0x000055555563523f in SVF::CHGBuilder::buildCHG (this=0x7fffffffe0d8)
at /home/hpatel/code/SVF/svf-llvm/lib/CHGBuilder.cpp:78
#7 0x00005555555ff1bd in SVF::SVFIRBuilder::build (this=0x7fffffffe240)
at /home/hpatel/code/SVF/svf-llvm/lib/SVFIRBuilder.cpp:70
#8 0x0000555555576efb in main (argc=3, argv=0x7fffffffe3e8) at /home/hpatel/code/SVF/svf-llvm/tools/WPA/wpa.cpp:65
(gdb)
Can you help me understand why this happens and how I can resolve it?
from svf.
Could you upload your bc file?
from svf.
Here it is.
compressed .bc file.zip
from svf.
@hpate063 Did you use llvm 16 as the compiler?
from svf.
No. My system has clang version 14.0.0 right now.
Should I try and update it to 16 or higher?
from svf.
No. My system has clang version 14.0.0 right now. Should I try and update it to 16 or higher?
Yes. SVF is running on LLVM 16.
from svf.
@hpate063 it works fine on my end. Can you try the latest SVF?
from svf.
Yes, I did and it worked. Thank you @jumormt and @yuleisui for the help.
from svf.
Related Issues (20)
- Function data flow
- How does SVF handle external functions without entities during memory analysis? HOT 4
- load module failed HOT 1
- Abstract Execution Fails to Trace Correct Allocation Size HOT 2
- ExtAPI module cannot handle those functions with name mangling. HOT 5
- Assertion when using SVF on Ceph HOT 7
- On running a llvm pass before svf pag construction HOT 2
- Error when compiling LLVM HOT 1
- SVF-example project reports error when compiled with LLVM under Debug mode. HOT 8
- SVF::SVFValue has an empty name while LLVM::Value has a name HOT 1
- LLVM assertion: "Initializer type must match GlobalVariable type" HOT 6
- `SVF_INSTALL_INCLUDE_DIR` lacks svf suffix HOT 1
- Performing reachability analysis between PAG edges HOT 1
- How to show more attributes on graphs? HOT 2
- How to create a CDG with SVF? HOT 25
- I encountered a segmentation fault.
- Failed to Extract Bc Files for Spec2006 HOT 1
- Hello, is there any mechanism in SVF to update TCT?
- dylib path issue on macOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svf.