Summary: In D29736444 (master320c82d9ad
), we added an ad-hoc simplification of formula. This diff reverts the diff and addresses the issue in the normalization logic. Problem: Before the D29736444 (320c82d9ad
) diff, given `p1=p2+0;`, Pulse could not reason correctly that the pointers `p1` and `p2` are alias. While we tried to solve the issue by an ad-hoc simplification (addressing it as `p1=p2;`), the real bug was in the normalization logic. https://www.internalfb.com/code/infer/[62c8b92c390587538b9e16032b72af56efe2b527]/infer/src/pulse/PulseOperations.ml?lines=270-276 Here, it makes a new value of `binop_addr` and returns it as a result of a binary operation. However, inside `PulseArithmetic.eval_binop`, if it finds an alias between `binop_addr` and another one `alias_addr`, it replaces all `binop_addr` in `astate` into the `alias_addr`. Thus, the last line returns `binop_addr` as a result, but there is no usage of which inside `astate`. As a solution, we replaced `binop_addr` too, when needed. Reviewed By: da319 Differential Revision: D29878980 fbshipit-source-id: 96a35bf16
parent
ad09c1cda6
commit
1b7b1c8d52
Loading…
Reference in new issue