mchalupa / dg

[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
MIT License
476 stars 131 forks source link

llvm-slicer seg faults during pointer analysis of grep 2.2 #225

Open naegling opened 5 years ago

naegling commented 5 years ago

llvm-slicer seg faults during pointer analysis of grep 2.2. See attached tar-ball for reproducting bc. Source file has been pre-processed by CIL and instrumented with no-op marker calls. grep.bc.zip

mchalupa commented 5 years ago

For some reason, RDA cannot find a points-to set of a store operand. I'll take look into that.

naegling commented 5 years ago

With current (within a few days anyway) master, all of my benchmarks are failing an assertion.

Assertion pts && "Don't have the points-to information for store" failed.

I have reverted to a prior commit contemporary with originally reported seg fault. Also, the original issues seems to be related to a noreturn function in grep. The function fatal() calls exit() and ends with an unreachable instruction. llvm-slicer is unhappy that it cannot link the fn return into the dependency graph.

mchalupa commented 5 years ago

Can you try the very latest version? And also if there is a difference with Release build? Thanks.

naegling commented 5 years ago

At least one benchmark (bc) that works with older version of dg, aborts() in debug build and emits an error in release builds: [RD] Error: Don't have the points-to node for store's target store %struct.bc_array_node* %31, %struct.bc_array_node** %37, align 8