summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/signals/main.cpp
diff options
context:
space:
mode:
authorMikhail R. Gadelha <mikhail.ramalho@gmail.com>2018-06-28 21:26:52 +0000
committerMikhail R. Gadelha <mikhail.ramalho@gmail.com>2018-06-28 21:26:52 +0000
commit53ac1a2ed44ca7711f8872d857be0c2e4152af17 (patch)
tree2af2d97a48d3cfe25aea29d0227a41b444726d0f /lldb/packages/Python/lldbsuite/test/python_api/signals/main.cpp
parentaadb254a79558de8ad5911ac7b4a6dacb45d44dc (diff)
downloadbcm5719-llvm-53ac1a2ed44ca7711f8872d857be0c2e4152af17.tar.gz
bcm5719-llvm-53ac1a2ed44ca7711f8872d857be0c2e4152af17.zip
[analyzer] Fix wrong comparison generation of the ranges generated by the refutation manager
The refutation manager is removing a true bug from the test in this patch. The problem is that the following constraint: ``` (conj_$1{struct o *}) - (reg_$3<int * r>): [-9223372036854775808, 0] ``` is encoded as: ``` (and (bvuge (bvsub $1 $3) #x8000000000000000) (bvule (bvsub $1 $3) #x0000000000000000)) ``` The issue is that unsigned comparisons (bvuge and bvule) are being generated instead of signed comparisons (bvsge and bvsle). When generating the expressions: ``` (conj_$1{p *}) - (reg_$3<int * r>) >= -9223372036854775808 ``` and ``` (conj_$1{p *}) - (reg_$3<int * r>) <= 0 ``` both -9223372036854775808 and 0 are casted to pointer type and `LTy->isSignedIntegerOrEnumerationType()` in `Z3ConstraintManager::getZ3BinExpr` only checks if the type is signed, not if it's a pointer. Reviewers: NoQ, george.karpenkov, ddcc Subscribers: rnkovacs, NoQ, george.karpenkov, ddcc, xazax.hun, szepet, a.sidorin Differential Revision: https://reviews.llvm.org/D48324 llvm-svn: 335926
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/signals/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud