Giter Club home page Giter Club logo

Comments (9)

jumormt avatar jumormt commented on July 23, 2024

You can use wllvm or gllvm to extract the linked bitcode of the codebase.

from svf.

hpate063 avatar hpate063 commented on July 23, 2024

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.

yuleisui avatar yuleisui commented on July 23, 2024

Could you upload your bc file?

from svf.

hpate063 avatar hpate063 commented on July 23, 2024

Here it is.
compressed .bc file.zip

from svf.

jumormt avatar jumormt commented on July 23, 2024

@hpate063 Did you use llvm 16 as the compiler?

from svf.

hpate063 avatar hpate063 commented on July 23, 2024

No. My system has clang version 14.0.0 right now.
Should I try and update it to 16 or higher?

from svf.

jumormt avatar jumormt commented on July 23, 2024

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.

jumormt avatar jumormt commented on July 23, 2024

@hpate063 it works fine on my end. Can you try the latest SVF?

from svf.

hpate063 avatar hpate063 commented on July 23, 2024

Yes, I did and it worked. Thank you @jumormt and @yuleisui for the help.

from svf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.