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
64c4034dca
fix: properly propagate NullPointerState along phi nodes in the NullPointerExceptionAnalysis
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
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 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
de0f9c2a1f
WALA: Provide acces to JSR 308 Annotations via new Class TypeAnnotation.
...
Access is provided via corresponding methods in FieldImpl, ShrikeCTMethod and ShrikeClass.
Since we do not currently have implementation of these methods for front-ends other than Shrike, these new methods are not yet made available in the corresponding interfaces.
2016-12-05 18:52:38 +01:00
Martin Hecker
8e773fcf88
in order to look up instruction-indices from a bytecode-indices, do a binary search on the existing pcMap array (as suggested by Julian Dolby).
...
also see https://sourceforge.net/p/wala/mailman/message/35518796/ and answers.
2016-12-05 18:52:37 +01:00
Martin Mohr
dff20ac49c
make JarStreamModule inherit the assumptions of JarInputStream's constructor
2016-12-05 18:50:21 +01:00
Martin Mohr
c00d9ec7af
avoid NPE while constructing debug message
2016-12-05 18:23:55 +01:00
Martin Mohr
3283de6c44
promote visibility of some handy but harmless methods
2016-12-05 18:23:55 +01:00
Martin Mohr
d830780242
slight fix of type parameter handling in PDG
2016-12-05 18:22:38 +01:00
Martin Mohr
4a7efc8c78
array creation is also safe if length comes from another array's length
2016-12-05 18:21:05 +01:00
Martin Mohr
13a7b5459e
prune exceptions for array creations of constant, non-negative size
2016-12-05 18:21:05 +01:00
Martin Mohr
f989290ca6
provide list of exceptions for array creation sites with non-negative size
2016-12-05 18:21:05 +01:00
Ben Liblit
ed0ddd780f
Correct HTML embedded in Javadoc comments
...
Most of the invalid HTML arose from bare "<" and ">" characters.
These should be escaped as "<" and ">" when not intended to
introduce HTML tags. When you have many such characters close
together, "{@literal ...}" is a nice, readable alternative that
automatically escapes its contents. If the text in question is
intended to be a code fragment, then "{@code ...}" is appropriate:
this is essentially equivalent to "<code>{@literal ...}</code>".
There were a few other HTML violations too, but none common enough to
be worth detailing here.
2016-11-28 11:14:41 -06:00
Ben Liblit
e35b205bc2
Fix numerous unescaped "<" and ">" in Javadoc @author tags
...
The contents of @author go straight into HTML, just like most other
Javadoc material. So if you want to have a "<foo@bar.com>" e-mail
address as part of the author information, the angle brackets must be
escaped. Here I've opted to do that using "{@code <foo@bar.com>}",
which has some additional styling effects that seem appropriate for
e-mail addresses. We could also have used "<foo@bar.com>" for
escaping without code styling.
2016-11-27 21:24:03 -06:00
Julian Dolby
166af27427
clean up types
2016-11-22 10:35:56 +08:00
Julian Dolby
8855f80c97
allow notion od edge labels to be overridden in the CDG
2016-09-26 19:42:19 -04:00
Julian Dolby
f3b5d41af9
refactor CFG to separate instructions from CFGs; this is to allow code like CDGs to be reused without an IR.
2016-09-26 13:37:51 -04:00
Manu Sridharan
1a7c527dbe
Remove unused conditionals
2016-09-20 14:04:03 -07:00
Manu Sridharan
e4101510a2
Add IExplodedBasicBlock.getOriginalNumber()
...
This method is useful when reasoning about SSAPiStatements, as their
successor block number refers to original basic blocks, not exploded
blocks.
2016-09-20 13:50:43 -07:00
Manu Sridharan
2c9eec0cff
Update callback APIs to expose path edge structure
2016-09-20 13:50:42 -07:00
Manu Sridharan
57198a22f3
Remove trailing whitespace; no functional change
2016-09-20 13:50:42 -07:00
Manu Sridharan
b761e3871b
Add new callbacks for tracking exploded supergraph
...
A subclass of TabulationSolver can now override the methods
newNormalExplodedEdge(), newCallExplodedEdge(), and
newReturnExplodedEdge() to take some action whenever (logically)
some edge in the exploded supergraph is "discovered" during
tabulation.
2016-09-20 13:50:42 -07:00
Julian Dolby
3156f03145
more CPA work
2016-09-19 13:51:18 -04:00
Julian Dolby
8b2ab22335
support for full CPA, when desired.
2016-09-15 21:32:35 -04:00
Julian Dolby
5eb1c7bc1d
HybriDroid support
2016-09-15 21:14:34 -04:00
Julian Dolby
30bc2858c4
fix for slicer issue in javascript
2016-08-23 20:59:08 -04:00
Julian Dolby
0f0c3d6bd9
add more functionality to analysis engine: create SDGs and
...
parameterize to do both regular and field-based analysis in JavaScript
2016-08-18 22:43:12 -04:00
Manu Sridharan
d0fdd2cdf0
Remove incorrect methods from ICFGSupergraph
...
These methods were constructing an IR based on some default
AnalysisOptions, which may not match the options used when constructing
the underlying CallGraph. This mismatch can lead to bad bugs.
Instead of these methods, analyses should get IR directory from the
CGNodes via CGNode.getIR().
Ideally we would fix the methods and not change the interface, but
that would require knowing the right AnalysisOptions, which itself
would necessitate an interface change.
2016-08-11 11:24:50 -07:00
Manu Sridharan
5e51615222
Fix some generic type warnings
2016-07-21 16:57:38 -07:00
Julian Dolby
73747cbb86
fixes for work with ECJ
2016-07-05 19:37:36 -04:00
Julian Dolby
22ce3d1144
Merge https://github.com/steohan/WALA
2016-06-29 13:03:50 -04:00
Andreas Sewe
e2e5bcf435
SecurityExceptions when analyzing JARs with broken/expired signatures
...
See <https://github.com/wala/WALA/issues/100 >
2016-06-08 11:08:10 +02:00
Julian Dolby
065a3ff767
pruned call graph takes edges as well as nodes
2016-06-06 14:17:12 -04:00
Julian Dolby
e87b2e5d84
fixes for slicing of field-based CGs
2016-02-14 17:18:21 -05:00
Julian Dolby
57a8c7d019
Merge branch 'master' of https://github.com/wala/WALA
2016-02-11 12:09:50 -05:00
Julian Dolby
eb7748a745
fixes for slicing of graphs built with the field-based builder
2016-02-11 11:51:39 -05:00
steohan
715b1e86fe
Merge pull request #1 from wala/master
...
Pull from Wala
2016-01-13 02:23:04 +01:00
Stephan Gocht
2869af24df
Bugfixes, code and documentation improvements.
2016-01-13 02:07:11 +01:00
Stephan Gocht
b75d93cb1c
Changed pi policy to only create pi nodes for integer variables.
2016-01-08 14:10:55 +01:00
Stephan Gocht
448c8c5f86
Missing Files for last commit.
2015-12-20 19:35:00 +01:00
Stephan Gocht
c3b7f9ffb3
Documentation and Refactoring.
2015-12-20 19:34:40 +01:00
Stephan Gocht
467707701f
Added InstructionByIindexMap, to make sureinstructions are identified by
...
iindex in hash and equals only.
2015-12-20 13:35:51 +01:00
Manu Sridharan
e95663e24a
Be more robust to broken java_runtime_dir
...
If java_runtime_dir in wala.properties is invalid, fall back to the
boot class path instead of just failing.
2015-12-16 10:56:09 -08:00
Julian Dolby
46a483f320
language changes
2015-12-15 19:33:59 -05:00
Julian Dolby
dc552316b9
language changes
2015-12-15 19:31:04 -05:00
Manu Sridharan
2f47ffa02b
Clarify a comment
2015-12-11 15:50:25 -08:00
Julian Dolby
1936ccd94f
changes for language work
2015-12-10 06:59:05 -05:00
Stephan Gocht
fd0d06df5d
Added correct handling for this pointer in member methods.
2015-11-30 23:03:28 +01:00
Stephan Gocht
bed18b792c
Extended exceptionan anlysis with exception filter.
2015-11-30 23:02:40 +01:00
Stephan Gocht
77b1ed71c7
Generalized Type.
2015-11-26 11:03:26 +01:00
Stephan Gocht
79883b3def
Completed implementation of basic functionality.
2015-11-25 17:05:51 +01:00
Stephan Gocht
c5c4799b35
Added minimalistic implementation of an exceptio analyisis. (Not fully
...
functional yet.)
2015-11-20 21:19:41 +01:00
Stephan Gocht
3acd97ebfb
Fixed assertion fault, in case of multidimensional arrays.
2015-11-15 21:05:39 +01:00
Julian Dolby
2b2543cfbb
fixed bugs with switch bytecodes in Dalvik.
...
ignore exceptions in callgraph construction when they are ignored in
bytecode from Dalvik.
2015-11-13 19:25:23 -05:00
Stephan Gocht
dfaa44d111
Added quicksort example, and made larger change as it wasn't as expected
...
first. This change should improve the results of the analysis.
2015-11-06 18:52:11 +01:00
Stephan Gocht
381cf2d2f1
Fixed a bug, which allowed only usage of phi notes with exactly 2 uses.
...
(There may be more than 2 uses in a phi note.)
2015-10-26 00:50:01 +01:00
Stephan Gocht
65fcc2d5da
Fixed a bug causing crash.
2015-10-23 14:55:39 +02:00
Stephan Gocht
ec4f5e506a
Removed unnecessary generic.
2015-10-23 14:54:49 +02:00
Stephan Gocht
7238f6d1ed
Fixed a bug, which was introduced in the previous commit. (Resulted in
...
infinite recursion.)
2015-10-23 09:48:20 +02:00
Stephan Gocht
e85816a986
Fixed getPis method.
2015-10-19 23:15:40 +02:00
Stephan Gocht
4e073e9afe
Added new PiPolicy to add pis for all variables used in a conditional
...
branch.
2015-10-19 23:15:21 +02:00
Stephan Gocht
58dd111203
Added classes for exception pruning and adapter for null pointer and
...
array out of bounds analysis.
2015-10-12 19:52:29 +02:00
Stephan Gocht
9024f19bf6
Added an array out of bounds analysis.
2015-10-12 19:51:14 +02:00
Stephan Gocht
f78ef5bcbb
Added new class for simpler access to intraprocedural null pointer
...
analysis.
2015-10-12 19:39:06 +02:00
Stephan Gocht
b32f798ae1
Modified files from earlyer change [1], so no format changes are done.
...
[1] 52ea4af62c
2015-10-11 19:25:05 +02:00
Julian Dolby
45af0414b7
more attempts to placate annoying ibm jvm
2015-09-18 21:48:13 -04:00
Julian Dolby
13de4a3bd1
add support for generic signatures
2015-09-16 13:23:21 -04:00
Stephan Gocht
6df7c85714
Changed class and construction modifier to public.
2015-09-07 23:11:41 +02:00
Stephan Gocht
2dc6322356
Extracted private class and made it public.
2015-09-07 21:49:03 +02:00
Stephan Gocht
52ea4af62c
Added Support for creating pi nodes for more than on variable.
2015-08-19 17:46:58 +02:00
Julian Dolby
045537274f
merge
2015-08-13 11:26:48 -04:00
Julian Dolby
671bd98977
Java 8 suport enhancements, mostly to model lambdas compiled to
...
invokedynamic
2015-08-12 15:20:21 -04:00
Julian Dolby
b1538aece6
Merge branch 'master' of https://github.com/wala/WALA
2015-08-09 13:47:01 -04:00
Julian Dolby
8470091225
Java 8 default methods
2015-08-09 13:46:03 -04:00
Manu Sridharan
13a46d8ea3
Fixes #82
...
PrunedCFG had been changed to always include an entry and exit node.
The logic for detecting an "empty" ExceptionPrunedCFG inside the PDG
construction code had not been updated appropriately.
2015-08-06 11:08:27 -07:00
Julian Dolby
223fb8d439
try to be more precise about finalize methods
2015-07-31 09:20:46 -04:00
Martin Mohr
9b8b323812
make configurable whether we apply an optimized version of hasExceptions()
2015-07-27 18:31:43 +02:00
Martin Mohr
65b9e97ae5
refine hasExceptions(): return true if there are *uncaught* exceptions
2015-07-27 14:17:18 +02:00
Julian Dolby
519b98a0ea
fixes to model of for ... in ... in JavaScript
2015-07-24 22:48:20 -04:00
Julian Dolby
563b6ba6aa
fixes for for ... in ... form in JavaScript
2015-07-24 22:44:10 -04:00
Julian Dolby
364fe7fa99
make dynamic and static analysis more consistent
2015-07-24 22:42:34 -04:00
Julian Dolby
b721a3ceb0
updates to dynamic call graphs to better match static ones
2015-07-10 09:44:01 +02:00
Julian Dolby
a6a060ed25
changes for handling of 'callbacks' in dynamic CGs
2015-06-28 17:06:21 -04:00
Martin Mohr
8d143dbf20
remove 'Custom Change' markers
2015-06-25 09:12:37 +02:00
Martin Mohr
0b92907149
Revert "cache for selectors"
...
This reverts commit 0af7f105ec
.
2015-06-25 09:12:37 +02:00
Juergen Graf
bd96807d7c
fix bug: npe on control dep computation when exceptions are ignored
2015-06-22 10:45:26 +02:00
Martin Mohr
f2a4bba83f
bugfix in debug output: only take item from worklist if it is not empty
2015-06-14 23:33:43 -07:00
Martin Mohr
b378f8c458
custom change: include target in string representation of cond-branch
2015-06-14 23:31:35 -07:00
Martin Mohr
29779f411a
allow adding a conditional branch instruction
2015-06-14 23:31:35 -07:00
Martin Mohr
a83ba08980
turn off debug output
2015-06-14 23:31:00 -07:00
Martin Mohr
80fd657675
transcribe non-overwritten reserved slots into "goto next" instructions
2015-06-14 23:31:00 -07:00
Martin Mohr
a5b6490951
fix getNextProgramCounter()
...
handle the case that the current program counter is free
2015-06-14 23:29:27 -07:00
Martin Mohr
1acbf4b9f7
preserve holes in instruction array when transcribing method summary
...
otherwise the iindex fields in the ssa instructions are inconsistent
with their index in the instruction array
2015-06-14 23:29:10 -07:00
Martin Mohr
1f105dc101
staticalize a method
2015-06-14 23:29:10 -07:00
Martin Mohr
9e5be48138
only generate return statement if caller and callee are compatible
2015-06-14 23:27:57 -07:00
Martin Mohr
0af7f105ec
cache for selectors
2015-06-14 23:27:57 -07:00
Julian Dolby
31f9f1b0b5
more exclusions
...
allow 1.8 libs
2015-06-04 15:51:46 -04:00