Commit Graph

247 Commits

Author SHA1 Message Date
Joe Hendrix
821d434370
Add support for equalities in jump table bounds. 2019-08-27 16:39:41 -07:00
Joe Hendrix
8376ecbed6
Fix warnings. 2019-08-23 09:57:54 -07:00
Joe Hendrix
c2545b1bb1
Work-in-progres: Cleanups to discovery for jumpbounds improvements. 2019-08-23 01:11:52 -07:00
Joe Hendrix
b1c6fb8b77
Fix parameterized-utils dependency 2019-08-21 23:59:22 -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
e8c4d39840
Introduce MemInt 2019-08-21 23:17:18 -07:00
Kevin Quick
84a14372cd
Fix parse error for haddock. 2019-08-12 22:11:25 -07:00
Joe Hendrix
f03fdce04b
Remove other unpack 2019-08-12 12:51:09 -07:00
Joe Hendrix
68d881c96f
Fix warnings 2019-08-12 11:44:39 -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
dfd92b047a
Add support for additional ARM relocations. 2019-08-01 09:43:36 -07:00
Joe Hendrix
a99d999fd0
Update for android compatibility 2019-07-29 11:41:50 -07:00
Joe Hendrix
bb66fd64ec
Merge branch 'master' into jhx/absstate 2019-07-12 00:31:46 +01:00
Kevin Quick
01c2d5d387
Add mhnf rewriting.
The parseFetchAndExecute in Discovery attempts to identify ParsedITE
terminal statements by examining the value of the ip_reg via
valueAsApp and pattern matching on a Mux statement.  This patch adds
specific handling in the Macaw CFG Rewriter to attempt to float Mux
statements upwards (aka "Mux Head Normal Form") so that they will be
the top-most ip_reg value and therefore be recognized as a ParsedITE
terminator.

For macaw-ppc testing of the 988KB gzip binary, this increased the
number of blocks found from 1339 to 37950 (and increased the test
runtime from 1.36s to 88.14s).
2019-07-10 23:59:11 -07:00
Joe Hendrix
a7a145be77
Fix compilation bugs in bcinc. 2019-07-03 13:50:01 -07:00
Joe Hendrix
b604cb28f1
Merge remote-tracking branch 'origin/master' into jhx/absstate 2019-07-03 13:24:46 -07:00
Joe Hendrix
52cf172c69
Minor layout/clarity updates. 2019-07-03 13:22:40 -07:00
Kevin Quick
1d03a7b3b6
[base] update ParsedIte/ParsedBranch reference in comment. 2019-07-02 11:09:16 -07:00
Joe Hendrix
f2249ffc23
Bump macaw-base version for export 2019-07-01 16:47:46 -07:00
Joe Hendrix
17c09c974f
Bump submodules; clarify stack offset abstract values 2019-07-01 16:35:47 -07:00
Joe Hendrix
cbb3814017
Fix warnings. 2019-06-13 09:33:58 -07:00
Joe Hendrix
c4870f9a37
Merge remote-tracking branch 'origin/master' into jhx/funargs 2019-06-12 15:51:55 -07:00
Joe Hendrix
dba7a2e88d
Bump submodules; version dependencies 2019-06-12 15:49:05 -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
Kevin Quick
7bacee3e9d
[base] fix haddock syntax error. 2019-06-05 14:40:59 -07:00
Joe Hendrix
d3c23cbe55
Remove CPP extension 2019-06-05 15:55:29 -04:00
Joe Hendrix
ee137cccc4
Cleanup warnings. 2019-06-05 15:31:03 -04:00
Joe Hendrix
4368ed6239
Fix parameterized-utils and bump version. 2019-06-05 09:50:12 -04:00
Joe Hendrix
c3f747aa86
Update dependencies/minor corrections. 2019-06-05 09:02:25 -04:00
Joe Hendrix
d58292feda
Generalize function argument analysis.
This patch focuses on function argument analysis, but includes some
other cleanups.

The main changes are to add additional comments and cleanups to the
function argument analysis code.  This also extends the analysis so
that we can annotate the types of some of the functions and use those
types during analysis.

As part of this we tighten the PLTStub checking, and clean up the
elfloader in some minor ways.
2019-06-05 04:42:02 -04:00
Joe Hendrix
5c097b45b7
Continue exporting width equality proofs comparison/equality. 2019-05-30 22:54:49 -07:00
Joe Hendrix
5221880b10
This makes a few minor changes primarily for reopt.
WidthEqProofs are now irrelevant.  Two proofs with the same
coercision source and destination will be equal.  This allows us to
add a transitivity constructor without introducing spurious
inequalities, and will in the future allow us to collapse multiple
bitcasts into a single bitcast.

adjustedLoadRegionIndex is exported for reopt.

TypeRepr now has a pretty instance.
2019-05-30 10:31:45 -07:00
Joe Hendrix
f0f5d0e123
Improve jump table bounds accuracy.
This adds functionality to the jump table bounds to work with trunc
that was deliberately removed in the last patch due to buggy code.
2019-05-14 21:03:08 -07:00
Joe Hendrix
0b7dae7add
Merge remote-tracking branch 'origin/jhx/no-branch' into jhx/no-branch 2019-05-14 17:48:37 -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
6299fa489b
Fix bug in AbsState.trunc 2019-05-11 16:29:54 -07:00
Joe Hendrix
ca2ca7d130
Merge remote-tracking branch 'origin/master' into jhx/no-branch 2019-05-06 10:54:35 -07:00
Joe Hendrix
56cadae3ae
Update submodules 2019-05-02 14:29:10 -07:00
Joe Hendrix
d20a3a9820
Update elf loader to use dynamic symbol table. 2019-05-02 12:36:43 -07:00
Joe Hendrix
008a53f3db
Add parsedTermSucc 2019-04-30 13:09:39 -07:00
Joe Hendrix
c6a7ba7cd6
Rename pblock fields to be more descriptive. 2019-04-29 22:21:10 -07:00
Joe Hendrix
581a01b5ef
Delete BlockLabel now that it is unused. 2019-04-29 21:57:41 -07:00
Joe Hendrix
70ea5b9036
Remove ParsedIte 2019-04-29 20:46:54 -07:00
Joe Hendrix
8aa4650683
Introduce ParsedBranch constructor. 2019-04-29 10:49:00 -07:00
Joe Hendrix
3331a19571
Drop support for branches within blocks. 2019-04-28 13:19:20 -07:00
Joe Hendrix
89f89e9ce6
This adds a conditional memory write to macaw. 2019-04-17 11:15:12 -07:00
Joe Hendrix
4513a92848
Update comments. 2019-04-08 16:31:28 -07:00
Joe Hendrix
62d27d629d
Update to latest elf-edit; bump other submodules. 2019-04-08 16:21:08 -07:00
Joe Hendrix
82b96fb62a
Fix warnings; improve PLTStub comment. 2019-03-25 19:27:46 -07:00
Joe Hendrix
f1f16b7509
Remove warnings 2019-03-22 14:40:14 -07:00