diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-02-15 23:07:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-15 23:07:49 +0100 |
| commit | 092d0bfaac18ffe683a8ef3a1dedc5dba80e7688 (patch) | |
| tree | f9bea52546592e40a390536e931e0f5c5375b233 /test/expression/simplifications.py | |
| parent | a861086781d551efb4aebccff95bd1539482849a (diff) | |
| parent | 2c62e418735010b8f816bc0d4d23973392ddceab (diff) | |
| download | miasm-092d0bfaac18ffe683a8ef3a1dedc5dba80e7688.tar.gz miasm-092d0bfaac18ffe683a8ef3a1dedc5dba80e7688.zip | |
Merge pull request #680 from commial/fix-simplifications
Fix a few simplifications
Diffstat (limited to 'test/expression/simplifications.py')
| -rw-r--r-- | test/expression/simplifications.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index 0c516a8e..76deb565 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -411,6 +411,16 @@ 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))), + (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: |