Assertion Failure in `SVF::CHGBuilder::analyzeVTables`
Overview:
I am currently investigating the pdftotext functionality within the xpdf project. During my analysis, I utilized the wllvm compiler to generate a bitcode file (pdftotext.bc) and subsequently employed the Whole Program Analysis (WPA) tool from the latest commit. However, the analysis process encounters an assertion failure in the SVF::CHGBuilder::analyzeVTables function when constructing the CHGraph.
Error Details:
Upon executing the command:
wpa -nander -dump-pag -dump-constraint-graph pdftotext.bc
The following assertion failure is triggered:
vcall gep idx not constantint
vcall gep idx not constantint
...
Assertion failed: false && "alias not function or bitcast", file SVF/svf-llvm/lib/CHGBuilder.cpp, line 493
Temporary Solution:
Temporarily commenting out the assert statement in the source code resolves the issue, allowing the program to run without errors. However, the root cause of the problem remains unclear, and the consequences of this temporary solution are unknown.
Thanks for reporting this. We will try to fix this. Could you help take a look at this @xudon9 @JasonZhongZexin
Hi, could you share the .bc file?
Sure. I compiled this file with llvm-14 and wllvm, and used "-O3" as the FLAGS. I can confirm that "-O0" works fine but all other levels fails. https://github.com/rycbar77/Files/raw/main/pdftotext.bc