Commit Graph

5020 Commits

Author SHA1 Message Date
Julian Dolby 50ce960170 fix to rewriter creation 2017-01-19 22:13:53 -05:00
Julian Dolby 2396d0fad3 Revert "Revert "fixes to getting source positions from JVML""
This reverts commit 619df0a83d.
2017-01-19 19:12:22 -05:00
Julian Dolby 619df0a83d Revert "fixes to getting source positions from JVML"
This reverts commit 9e35099326.
2017-01-19 18:49:02 -05:00
Julian Dolby 9e35099326 fixes to getting source positions from JVML
CAst rewriter abstraction
2017-01-19 17:52:42 -05:00
Julian Dolby 74cc8454e3 make more of WALA run on TeaVM 2017-01-17 13:14:56 -05:00
Julian Dolby 46dddcfb66 Bug fix for CAst translation. When translating if statements, the system has a case where code to detect dead blocks mistakenly triggers even though the needed CFG edge will be added later. The if processing code now tells the CFG that the block is not dead, which prevents it from being prematurely removed. 2017-01-16 21:57:12 -05:00
Julian Dolby 8d04766aa9 more changes for CHAs 2017-01-12 16:36:26 -05:00
Julian Dolby c9b1006305 changes for allowing seq. and conc. CHAs 2017-01-12 16:34:54 -05:00
Julian Dolby 602800524b Hacks to make WALA run on TeaVM, and hence be able to run in Web browsers. TeaVM has some warts, but overall it is a very nice mechanism to run Java code on the browser. I have examples of analysis actually running in Firefox, which enables supportive tools. So, for those changes that are not ideal, such as dropping the ConcurrentHashMap in ClassHierarchy, we should find a way to support both them and TeaVM, based on demand. 2017-01-12 12:25:37 -05:00
Julian Dolby 7a69f752d0 type cleanups 2017-01-11 08:04:37 -05:00
Julian Dolby 137fed6e62 optionally dump CG 2017-01-05 14:10:11 -05:00
Julian Dolby 70dac5ca69 support for more languages 2017-01-05 14:09:52 -05:00
Julian Dolby 37989efb6a adapt to teavm changes 2017-01-03 21:06:21 -05:00
Julian Dolby 15c8d711db changes for working with TeaVM and compilation to JavaScript 2017-01-03 20:58:16 -05:00
Julian Dolby d85226fa93 nnotation 2017-01-03 20:55:46 -05:00
Julian Dolby 51e59ef0bd more support for more languages 2017-01-03 20:51:49 -05:00
Julian Dolby 12404a0ce6 Merge branch 'master' of https://github.com/wala/WALA 2017-01-03 18:59:24 -05:00
Manu Sridharan f12b1a3df9 Merge pull request #130 from joana-team/dexlib-fix
Dexlib fix
2017-01-03 10:38:10 -08:00
Martin Mohr fcb9c57e40 fix download location for dexlib 2017-01-03 18:17:34 +01:00
Martin Mohr e78e71fe71 fetch dexlib-1.3.4.jar from SCanDroid
This buys us some time to work on a proper solution, aka:
porting from dexlib to dexlib2
2017-01-03 18:09:23 +01:00
Manu Sridharan 63e3f82d38 Revert "fetch dexlib-1.3.4.jar from SCanDroid"
This reverts commit fc31fce698.
2017-01-02 16:12:53 -08:00
Martin Mohr fc31fce698 fetch dexlib-1.3.4.jar from SCanDroid
This buys us some time to work on a proper solution, aka:
porting from dexlib to dexlib2
2017-01-02 16:05:43 -08:00
Manu Sridharan f42ad7aea6 Fix #127
Check that we only loop over the parameters actually being passed at
the call site in the SDG construction.
2017-01-02 15:36:38 -08:00
Martin Mohr b9fb5e0481 display which classes each handler catches when outputting IR 2016-12-09 16:49:56 +01:00
Martin Mohr 4228bac5ff If we see a call to an unknown method, conservatively add edges to all catch handlers
This is an attempt to fix issue #123
2016-12-09 16:46:01 +01:00
Martin Mohr ee22e177c5 Dalvik-Frontend: add catch-all handler at the end and not at the beginning 2016-12-09 16:40:14 +01:00
Martin Hecker d5dee55918 correctly prune safe array creation for multi-dimensional array creation 2016-12-07 19:27:59 +01:00
Martin Mohr f7299b003b fix compilation problems caused by merge 2016-12-07 17:56:59 +01:00
Martin Hecker 4905695e4a more interprocedural NullPointerException test cases 2016-12-07 17:56:59 +01:00
Martin Hecker 64c4034dca fix: properly propagate NullPointerState along phi nodes in the NullPointerExceptionAnalysis 2016-12-07 17:56:59 +01:00
Martin Hecker 7293d18a89 another test case for the NullPointerException analysis 2016-12-07 17:56:59 +01:00
Martin Hecker c7f618eb6f add some tests both for intra and inter-procedural NullPointerException Analysis 2016-12-07 17:56:59 +01:00
Martin Hecker 4fca71c595 some more simple tests for intraprocedurel NullPointerException Analysis 2016-12-07 17:56:59 +01:00
Martin Hecker edf4f8ed6f Attempt to fix intraprocedural Nullpointer analysis by respecting phi nodes, and correctly initializing entry variables.
Since  SSAPhiInstructions are never visited by NullPointerTransferFunctionProvider.TransferFunctionSSAVisitor,
we now respect phi instructions present at a given block by providing additional NodeTransferFunctions, improving precision.

Formerly, meets would lead to incorrect results due to incorrect initialization of initial data flow facts.

These are now properly initialized, interpreting
  "State.BOTH" to mean: both "null" and "non-null" are possible values for the given variable, and
  "State.UNKNOWN" to be the absurd assertion.

The initial fact at the entry block assumes variables to be BOTH, other blocks are initialy assumed unreachable and hence their variables to be UNKNOWN.
2016-12-07 17:56:48 +01:00
Martin Mohr 6d0ba7d371 Make a variant of TypeInference which supports dalvik bytecode
Dalvik bytecode represents 'null' as 0 which may lead to problems
in phi instructions. This variant of TypeInference fixes these
problems by

- tracking whether an SSA value is constant zero and
- ignoring constant zeros in the transfer function of phi instructions
  when meeting with non-primitive types
2016-12-07 16:34:13 +01:00
Martin Mohr 9ada546c5d Activity.onStop is part of the loop 2016-12-07 16:11:19 +01:00
Martin Mohr 9a3e869dd1 use pi nodes in dalvik frontend 2016-12-07 16:11:19 +01:00
Martin Mohr 5624ad78fa really turn off short circuit optimization
The setting should comply with the comment. Plus,
turning it on seems to lead to some unsoundness because
exception points-to sets become empty but should not be
2016-12-07 16:11:19 +01:00
Martin Mohr fd2d4aefbf further fixes in dalvik front-end to avoid NullPointerExceptions and other errors 2016-12-07 16:11:19 +01:00
Martin Mohr 42ae088c05 turn exception throwing into debug logging message 2016-12-07 16:11:19 +01:00
Martin Mohr a8cb767c63 allow action names starting with "."
According to [1], such action names are allowed and implicitly to be
prepended with the package name of the application.

[1] http://developer.android.com/guide/topics/manifest/activity-element.html
2016-12-07 16:11:19 +01:00
Martin Mohr 7c657f5754 allow unqualified custom actions 2016-12-07 16:11:19 +01:00
Martin Mohr be635cf50d support for activity aliases 2016-12-07 16:11:19 +01:00
Martin Mohr 92f26a33c2 clarification 2016-12-07 16:11:19 +01:00
Martin Mohr 95031461f4 handle gracefully the case of intent-filter without action
According to [1], such intent-filters do not let any intent
pass but on the other hand do no harm

[1] http://developer.android.com/guide/topics/manifest/action-element.html
2016-12-07 16:11:19 +01:00
Martin Mohr a1fa8a2057 update intent information instead of crashing 2016-12-07 16:11:18 +01:00
Julian Dolby 891bf3f585 Merge branch 'master' of https://github.com/wala/WALA 2016-12-06 12:50:09 -05:00
Julian Dolby 8fd17b3463 merge 2016-12-06 12:50:04 -05:00
Martin Hecker 867a8ecf2b When creating TypeAnnotations with LocalVarTarget, somewhat deal with class files that lack a LocalVariableTable 2016-12-05 18:52:38 +01:00
Martin Hecker 5f617c19e3 Tests for the new JSR 308 type annotations implementation. 2016-12-05 18:52:38 +01:00