Commit Graph

190 Commits

Author SHA1 Message Date
Joe Hendrix
0ad6ed8a85
Minor cleanup 2019-08-29 23:50:25 -07:00
Joe Hendrix
0767302c21
Add .gitignore for assembly files. 2019-08-27 16:42:08 -07:00
Joe Hendrix
433df7399e
Additional Hashable instances for Macaw/hashtable compatibility. 2019-08-27 16:40:16 -07:00
Joe Hendrix
821d434370
Add support for equalities in jump table bounds. 2019-08-27 16:39:41 -07:00
Joe Hendrix
c2545b1bb1
Work-in-progres: Cleanups to discovery for jumpbounds improvements. 2019-08-23 01:11:52 -07:00
Joe Hendrix
494aff6ff0
This makes a number of changes to abstract domains.
The goal is to support a jumptable testcase that is not supported by
the current jump bounds check.  The jump bounds check needs to be
augmented so that it understands equality relationships between stack
values and registers, and bounds on both.

This patch tracks when a register points to a concrete stack offset.

As part of this, we droped the AbsDomain instance for AbsBlockState.
Clients should now likely use `fnStartAbsBlockState` in lieu of `top`.

The other client visible change is that the ClassifyFailure
constructor now has an extra argument with details about why
classification failure occured.
2019-08-21 23:29:16 -07:00
Joe Hendrix
073e774a43
Introduce CValue; clarify function arguments fields.
This introduces a new datatype CValue for representing constants
in Macaw programs, modifies the existing Value datatype to use then,
and introduces patterns for compatibility with existing datatypes.

The patch also updates the function argument analysis to use more
explicit argument passing rather than monadic updates.  The intent is
to help clarify when data is initialized rather than updated.

Finally this updates a README and does some minor updates.
2019-08-06 09:37:41 -07:00
Joe Hendrix
06b0390cfd
Fix missing import in x86 2019-07-01 17:13:06 -07:00
Joe Hendrix
17c09c974f
Bump submodules; clarify stack offset abstract values 2019-07-01 16:35:47 -07:00
Joe Hendrix
ee6f1379ae
Additional cleanup to function args; bump versions.
This also provides some exports needed by Reopt.
2019-06-12 15:26:19 -07:00
Joe Hendrix
1607e83eef
Minor refactoring; improved branch abstract state propagation.
This primarily refines the abstract state propagated to branch
pairs.  It was needed on the ARM platform to support the IT blocks
with the changes to the Core representation in macaw-base 0.3.6.

This also includes a few simplifications added and comment
improvements.
2019-05-14 17:45:30 -07:00
Joe Hendrix
c6a7ba7cd6
Rename pblock fields to be more descriptive. 2019-04-29 22:21:10 -07:00
Joe Hendrix
327003ae56
Fix test case. 2019-04-29 22:04:21 -07:00
Joe Hendrix
3331a19571
Drop support for branches within blocks. 2019-04-28 13:19:20 -07:00
Joe Hendrix
2d12aea63b
Merge branch 'jhx/bump-submodules' into jhx/cond-write 2019-04-26 10:38:50 -07:00
Joe Hendrix
89f89e9ce6
This adds a conditional memory write to macaw. 2019-04-17 11:15:12 -07:00
Joe Hendrix
ec15debe20
Minor updates 2019-04-12 11:24:37 -07:00
Joe Hendrix
ef6951458a
Add pop tests. 2019-04-04 09:42:11 -07:00
Joe Hendrix
092cbc2e26
Minor fixes to tests 2019-04-03 16:44:00 -07:00
Joe Hendrix
3e763cc7a1
Add ret test 2019-04-03 16:43:42 -07:00
Joe Hendrix
74e8c6580e
Merge pull request #32 from GaloisInc/jhx/x86_tests
Add tests for btc/btr/bts
2019-04-03 13:59:50 -05:00
Joe Hendrix
036944d42e
Add btc/btr/bts tests 2019-04-03 08:24:57 -07:00
Joe Hendrix
a6149fa95f
Add x86-support to travis 2019-03-26 08:21:01 -07:00
Joe Hendrix
f1f16b7509
Remove warnings 2019-03-22 14:40:14 -07:00
Joe Hendrix
51333f4612
Deprecate outdated disassemble block functions. 2019-03-14 10:41:11 -07:00
Joe Hendrix
e8d2efcaae
Implement bitcast changes to macaw-symbolic 2019-02-26 17:53:34 -08:00
Joe Hendrix
c950affd65
Fix build errors made in previous commit. 2019-02-20 15:57:56 -08:00
Joe Hendrix
00096344a7
Support float/vector in reads/writes; Use floating point types. 2019-02-20 15:40:59 -08:00
Joe Hendrix
d3947f32b4
Support ZMM, bitcasting, and fixed length vectors. 2019-02-14 11:06:45 -08:00
Luke Maurer
cbda1717cc Fix for GHC versions < 8.8
`MonadFail` being a forward-compatibility measure, overriding
`Control.Monad.Fail.fail` in GHC versions <= 8.6 doesn't do anything
unless `Control.Monad.Fail.fail` is invoked explicitly (or the importing
module happens to have `-XMonadFailDesugaring` on).
2019-02-12 18:24:41 -08:00
Langston Barrett
274808a8ae update parameterized-utils submodule 2019-02-11 11:47:19 -08:00
Tristan Ravitch
05249a4632 Change some calls to fail into translation errors
These `getCallTarget` and `doJump` were calling `fail` if they saw an argument
type that we hadn't thought to handle yet.  This change turns those errors into
TranslationError statements, allowing macaw to continue exploring code.

This came up recently in a glibc-based example where macaw ended up exploring
unaligned code and creating a strange jump to a far pointer, which doesn't make
much sense in x86_64 mode.
2019-01-23 13:22:03 -08:00
Joe Hendrix
a5e3ba7247
Additional exports 2019-01-22 15:51:38 -05:00
Joe Hendrix
3eb92f34e1
Add x86_tests 2019-01-22 13:25:37 -05:00
Joe Hendrix
0eac4d6b49
Remove blockAddr; update dependencies 2019-01-22 05:07:52 -05:00
Tristan Ravitch
68c5578f03 symbolic: Translate the InstructionStart metadata statement into Crucible
Before, we just discarded them during the translation.  They are useful metadata
for generating diagnostics in Crucible, so this commit translates them.  They
are no-ops during symbolic evaluation.

To make them truly useful, they need to include the address of the block that
they belong to (their data payload in macaw is just an offset from the start of
a block).  This information wasn't available before, so it has to be plumbed
through in macaw-x86.
2019-01-10 22:23:39 -08:00
Kevin Quick
98807daee2
Added -Wcompat for warnings about future compatibility. 2019-01-10 13:43:27 -08:00
Joe Hendrix
ebc5d9575e
Merge remote-tracking branch 'public/master' into jhx/plt-support 2018-12-04 08:04:32 -08:00
Joe Hendrix
f03941d607
Add test-plt test case, and fix discovery to use trust symbols. 2018-12-04 00:04:23 -08:00
Andrei Stefanescu
3f39c614e9 Add support for RepMovs and RepStos. 2018-11-27 02:23:36 -08:00
Kevin Quick
1d7cdc87eb
Implement NoStarIsType and MonadFail for GHC 8.6. 2018-11-21 00:08:33 +00:00
Joe Hendrix
c4b7252c77
Add specialized terminal statement for PLT stubs. 2018-11-16 13:40:40 -05:00
Joe Hendrix
23fe50bd45
Fix stack offset. 2018-11-12 15:28:32 -05:00
Joe Hendrix
bb63f9f859
This fixes tail call detection, and allows architecture-specific checks. 2018-11-12 11:56:44 -05:00
Kevin Quick
ceba0bfa67
[x86] Update memory references to remove deprecated uses. 2018-10-31 13:48:06 -07:00
Kevin Quick
db17327121
[x86] Add andnps semantics with consolidation of binary bitwise support. 2018-10-31 11:50:15 -07:00
Kevin Quick
6d996f7739
[x86] Add shld and shrd instruction semantics. 2018-10-31 11:49:14 -07:00
Kevin Quick
1ca2c5582c
[x86] Fix cvtsd2ss instruction mnemonic. 2018-10-31 11:48:18 -07:00
Kevin Quick
3c76f404af
[x86] Comment fixes. 2018-10-31 11:47:52 -07:00
Kevin Quick
6212a69233
[x86] Add semantics for sqrtss and sqrtsd. 2018-10-31 11:46:01 -07:00