Граф коммитов

6886 Коммитов

Автор SHA1 Сообщение Дата
Mark Shannon da6a66975c Python taint-tracking. Further improvements to new taint-tracking. 2019-08-29 10:31:50 +01:00
Mark Shannon 74f1dd3ec0 Python taint-tracking. Add some tests and fix up various parts of the implementation. 2019-08-29 10:31:50 +01:00
Mark Shannon eed2090168 Python taint-tracking. Fill in most of new configuration-base taint-tracking implementation. 2019-08-29 10:31:47 +01:00
Mark Shannon e8bd9e7341 Python: Add new API for taint-tracking configuration. As yet, unsupported. 2019-08-29 10:27:08 +01:00
Anders Schack-Mulligen ae98d4fd8e Java: Change extension point to use a unit type. 2019-08-29 11:05:45 +02:00
Calum Grant d2bee79370
Merge pull request #1600 from AndreiDiaconu1/ircsharp
C#: Initial port of IR for C#
2019-08-29 09:26:34 +01:00
Ian Lynagh 395197432f C++: Update stats for valuetext 2019-08-28 22:52:14 +01:00
Rebecca Valentine 36f99c19bc
Merge pull request #1840 from markshannon/python-better-hasattribute-handling
Python: Add 'hasAttribute' predicate to ObjectInternal and Value.
2019-08-28 10:45:44 -07:00
Rebecca Valentine cac775880f
Merge pull request #1839 from markshannon/python-rationalize-library
Python: rationalize library a bit.
2019-08-28 10:15:36 -07:00
Rebecca Valentine 602b99e01f
Merge pull request #1834 from markshannon/python-verify-unreachable-code
Python: Add test to verify fix.
2019-08-28 10:15:26 -07:00
Rebecca Valentine ac78d10277
Merge pull request #1821 from markshannon/python-speedup-binary-points-to
Python points-to: Speed up binaryPointsTo predicate.
2019-08-28 10:14:40 -07:00
Mark Shannon 5892ce2a2b Python: Implement 'hasAttribute()' on ObjectInternal and use it to implement the same predicate on Value, ModuleObject and ClassObject. 2019-08-28 17:18:25 +01:00
Geoffrey White 2e0c1af6c4
Merge pull request #1836 from jbj/xheader-undef
C++: Support x-macros that are #undef'ed in header
2019-08-28 17:16:50 +01:00
Ian Lynagh cc031183bc C++: Add an upgrade script 2019-08-28 16:06:28 +01:00
AndreiDiaconu1 deeff07322 Fixed unused predicate error 2019-08-28 15:50:39 +01:00
Mark Shannon f64f6e6d2e Python: Move classes for lists of AST nodes into AstExtended.qll 2019-08-28 15:43:02 +01:00
Tom Hvitved 853a3aa998
Merge pull request #1799 from aschackmull/java/fieldflow-perf
Java/C++/C#: Improve performance of data flow with fields.
2019-08-28 16:30:25 +02:00
Geoffrey White fbeed9113b
Merge pull request #1837 from jbj/change-note-1.23
C++: New empty change-notes file for 1.23
2019-08-28 14:57:47 +01:00
Ian Lynagh 6d18b4e894 C++: If we don't have a valuetext, then see if one of our conversions does 2019-08-28 14:49:51 +01:00
Mark Shannon 97f9920a69 Python: Move NameNode class in Flow.qll with other CFG classes. 2019-08-28 14:39:27 +01:00
Mark Shannon 68da13cdc2 Python remove a couple of small AST related modules, moving contents to more appropriate modules. 2019-08-28 14:28:04 +01:00
Ian Lynagh 95794f9227 C++: Handle values with no valuetext 2019-08-28 14:27:08 +01:00
AndreiDiaconu1 489dbe1d01 Fixed errors
Added some new classes for built in operations that for the moment
have no effect (added to remove errors)
2019-08-28 14:23:42 +01:00
Ian Lynagh 754612d257 C++: Split valuetext off into its own table 2019-08-28 14:09:13 +01:00
Luke Cartey 1669d283fe
Merge pull request #1795 from aschackmull/java/localexprflow
Java: Add localExprFlow and localExprTaint.
2019-08-28 14:04:49 +01:00
Jonas Jensen d4f8e73a66 C++: Change name of UncheckedReturn...Functions.ql
The previous name was identical to the name of
`Adding365DaysPerYear.ql`. It may have been a copy-paste error.
2019-08-28 14:05:31 +02:00
Jonas Jensen c8a9ec465e C++: New change-notes file for 1.23 2019-08-28 13:36:57 +02:00
AndreiDiaconu1 05ae04df72 Synced files 2019-08-28 12:30:17 +01:00
AndreiDiaconu1 66948b4f57 Fixed PR errors 2019-08-28 12:25:14 +01:00
AndreiDiaconu1 c74898ec9f Synced files
Synced the files that are needed for this PR
2019-08-28 12:25:14 +01:00
AndreiDiaconu1 7390606370 Tidy up + more comment
Tidied up the code for review
Added more comments
2019-08-28 12:25:14 +01:00
AndreiDiaconu1 0c6ffc9f4d Casts and IsExpr
Fixed some inconsistencies with casts
Fixed some bugs related to which translated elements need loads
Added support for IsExpr expressions
2019-08-28 12:25:14 +01:00
AndreiDiaconu1 c8a3f6fac8 Added cast exprs + deleted commented code 2019-08-28 12:25:14 +01:00
AndreiDiaconu1 34bafa7230 Fixed sanity checks
Fixed a bug in `TranslatedArrayExpr` that would prevent the element to produce the correct instruction result, hence creating problems with loads and stores.
`ElementsAddress` opcode now inherits from the `UnaryOpcode`, as it should.
2019-08-28 12:25:14 +01:00
AndreiDiaconu1 23694bdd14 Work on classes + refactor
Began working o inheritance, polymorphism and constructor init. Correct code is produced for them (though some more work is needed to accurately treat conversions between classes).
Removed commented code.
Added classes to properly deal with constructor init and modified and refactored TranslatedFunction to accomodate for the changes.
2019-08-28 12:25:14 +01:00
AndreiDiaconu1 9018b25177 Properties
Properties and property access produce correct code.
Fixed a function qualifier bug in `TranslatedCall.qll`.
Added a new class to translate `ExprStmt`s whose expr is an `AssignExpr` whose lvalue is an accessor call: we translate only the accessor call in for the translated AST.
2019-08-28 12:25:14 +01:00
AndreiDiaconu1 1acabc7d87 Jump statements
Broke down the class `TranslatedJump` to have more control on the IR control flow.
Now GotoLabelStmt, GotoCaseStmt, GotoDefaultStmt and BreakStmt are translated separately.
This also fixes an issue when having a switch as the last statement of a void function would create an incorrect CFG.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 2724075dec Added stmts
Added support for `ForStmt` and `DoWhileStmt`
Added test cases
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 b6287b904c Preliminary refactoring
Some preliminary refactoring of the TranslatedDeclaration.qll file
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 1e4b3fafb6 Updated expected for crement ops 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 940ba694d2 Arithmetic increment and decrement expressions
Correct code is now produced for increment and decrement expressions
Modified producesExprResult() and TTranslatedLoad() so that no loads are done from outside the crement exprs and that the VariableAddress generated from the access of the operator variable is recognized as an expr that produces result.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 3bc6456572 Work on throw statements, bug fixes, small refactor.
Throw statements now give correct code, apart from the case of rethrows: need to make explicit the fact that a finally block is executed even if stack unwinding happens.
Added 2 new classes to TranslatedStmt.qll, one for throws that have an exception, one for rethrows.
Fixed a bug in TranslatedDeclarationEntry.qll where some local declaration would be missed.
Changed toString into getQualifiedName for more clarity when generating the instructions in Instruction.qll.
Some general refactoring in TranslatedExpr.qll and TranslatedStmt.qll.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1 b90bc96cb5 Objects tests and fix in PrintIR
Added tests to showcase the instructions generated for object creation and object initialization
Updated raw_ir.expected
PrintIR now uses the qualified name (with types) when printing the IR for more clarity
2019-08-28 12:25:13 +01:00
Andrei Diaconu 8661074fc3 Object creation and initialization + refactoring
Correct code is now generated from ObjectCreation exprs and ObjectInitializer exprs.
Removed TranslatedFieldInitialization and its subclasses and further refactored TranslatedInitialization
2019-08-28 12:25:13 +01:00
Andrei Diaconu dae37e5472 Fixed bugs, updated tests
Fixed a bug in TranslatedExpr: decl + init where the rhs is a reference now work as expected
Uncommented the code for the switch statement
2019-08-28 12:25:13 +01:00
Andrei Diaconu be01b031b0 Fixed and refactored code for arrays
Introduced 2 new tags to support multidimensional arrays
Multidimensional arrays produce correct code
All types of initializations for arrays work correctly
2019-08-28 12:25:13 +01:00
Andrei Diaconu 35b028e626 Initial work for objects and statements
Objects now work, although I will refactor the code quite a bit for clarity
If and while statements now produce good code
Began work on try statements
2019-08-28 12:25:13 +01:00
Andrei Diaconu 4462babc0b Added support for switch stmt (CS 6.0 style) 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 de6f547088 Synced more files 2019-08-28 12:25:13 +01:00
AndreiDiaconu1 49777636aa Applied the review comments 2019-08-28 12:25:13 +01:00