about summary refs log tree commit diff stats
path: root/test/expression
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-02-15 12:53:29 +0100
committerAjax <commial@gmail.com>2018-02-15 15:03:27 +0100
commitfab5d2dfa23c30c083ae3c5738c8c0b7832b18cc (patch)
treed8d893f1fcc292533b39aad20664cb89b2a565aa /test/expression
parent9dd075f09e4f31ec7fe12e50709d9e58c65ed5f4 (diff)
downloadmiasm-fab5d2dfa23c30c083ae3c5738c8c0b7832b18cc.tar.gz
miasm-fab5d2dfa23c30c083ae3c5738c8c0b7832b18cc.zip
simp_compose: ensure the '/' is not rounded to 0, but really equals to
Diffstat (limited to 'test/expression')
-rw-r--r--test/expression/simplifications.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index 0c516a8e..add689c7 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -411,6 +411,10 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)),
     (a >> b >> c, a >> b >> c), # Left unmodified
     (a >> b_msb_null >> c_msb_null,
      a >> (b_msb_null + c_msb_null)),
+
+    # 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))),
 ]
 
 for e_input, e_check in to_test: