about summary refs log tree commit diff stats
path: root/test/expression/simplifications.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-02-15 12:58:10 +0100
committerAjax <commial@gmail.com>2018-02-15 15:07:52 +0100
commit2c62e418735010b8f816bc0d4d23973392ddceab (patch)
tree1d3b320dd6be68ea8af7d99e228e95bfac70aaa7 /test/expression/simplifications.py
parentfab5d2dfa23c30c083ae3c5738c8c0b7832b18cc (diff)
downloadfocaccia-miasm-2c62e418735010b8f816bc0d4d23973392ddceab.tar.gz
focaccia-miasm-2c62e418735010b8f816bc0d4d23973392ddceab.zip
'simp_propag': avoid computing shifts when the size is too
big (potential Python overflow)
Diffstat (limited to 'test/expression/simplifications.py')
-rw-r--r--test/expression/simplifications.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index add689c7..76deb565 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -415,6 +415,12 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)),
     # Degenerated case from fuzzing, which had previously raised bugs
     (ExprCompose(ExprInt(0x7, 3), ExprMem(ExprInt(0x39E21, 19), 1), ExprMem(ExprInt(0x39E21, 19), 1)),
      ExprCompose(ExprInt(0x7, 3), ExprMem(ExprInt(0x39E21, 19), 1), ExprMem(ExprInt(0x39E21, 19), 1))),
+    (ExprOp('>>', ExprInt(0x5E580475, 92), ExprInt(0x7D800000000000000331720, 92)),
+     ExprInt(0x0, 92)),
+    (ExprOp('a>>', ExprInt(0x5E580475, 92), ExprInt(0x7D800000000000000331720, 92)),
+     ExprInt(0x0, 92)),
+    (ExprOp('a>>', ExprInt(-0x5E580475, 92), ExprInt(0x7D800000000000000331720, 92)),
+     ExprInt(-1, 92)),
 ]
 
 for e_input, e_check in to_test: