Closed nubi12336 closed 3 years ago
I printed out in Memory.pp Format.std_formatter
memory Analysis.check_instr.
Below is result.
I think second row is weird..
I can't find the bug due to the lack of information.
However, I guess analysis.run
function ortransfer_*
may have a problem.
Please debug yourrun
and transfer_*
function carefully.
How come it can happen that, in the resulting table there is %div3 = sdiv i32 10, %call, !dbg !23 -> %call -> Neg
, but in the result div3, %call become top?(above picture)
%div3 ~ is 10/x in if (x < 0) {z = 10 / x}
.
In example1.c, there is
if (x<0)
and it is%div3 = sdiv i32 10, %call, !dbg !23
in example1.ll,if.then2
. I printed out a table and I got a result%div3 = sdiv i32 10, %call, !dbg !23 -> %call -> Neg
. Then, I thought, in Analysis.check_instr, as it matches with Llvm.Opcode.SDiv andv
isNeg
(ase
is%call
)Memory.Value.order zero v
must be false. However, it prints outPotential Division-by-zero @ example1.c:main:9:14, %call = Top
.What is wrong?