Alex Ford
17e5b9cffa
Revert "Update clap requirement from 2.33 to 3.0 in /ruby/generator"
2022-01-10 18:21:04 +00:00
Chris Smowton
e352a4b994
Note that parameterizations of local classes are themselves local
...
Previously `LocalClass` itself would match `.isLocal()` whereas `LocalClass<Param>` would not. Rather than require each individual user to check for `.getSourceDeclaration().isLocal()`, let's note that the specializations themselves are local.
2022-01-10 18:19:31 +00:00
Robert Marsh
fe355a0bc9
C++: update test comments
2022-01-10 12:38:08 -05:00
Mathias Vorreiter Pedersen
2a02ce137a
C++: Fix join orders in 'exprIsSubLeftOrLess'.
...
Before:
Tuple counts for UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff/2@i3#a5071w3a after 24s:
304220 ~2% {2} r1 = JOIN UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev_delta WITH Expr::BinaryOperation#class#f#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.0 'sub'
190061335 ~24% {2} r2 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
3956 ~0% {2} r3 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
407983 ~1% {2} r4 = JOIN Expr::BinaryOperation#class#f#join_rhs WITH UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev ON FIRST 1 OUTPUT Rhs.1 'n', Lhs.0 'sub'
380823 ~0% {2} r5 = JOIN r4 WITH DataFlowUtil::TExprNode#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1
0 ~0% {2} r6 = JOIN r5 WITH UnsignedDifferenceExpressionComparedZero::isGuarded#fff#prev_delta ON FIRST 2 OUTPUT Rhs.2, Lhs.0 'sub'
0 ~0% {2} r7 = JOIN r6 WITH DataFlowUtil::TExprNode#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
3956 ~0% {2} r8 = r3 UNION r7
190065291 ~24% {2} r9 = r2 UNION r8
...
After:
Tuple counts for UnsignedDifferenceExpressionComparedZero::interestingSubExpr#f/1@654e29g3 after 228ms:
370 ~2% {2} r1 = ComparisonOperation::RelationalOperation::getGreaterOperand_dispred#fb AND NOT Exclusions::isFromMacroDefinition#b(Lhs.1 'sub')
370 ~0% {2} r2 = SCAN r1 OUTPUT In.1 'sub', In.0
370 ~3% {3} r3 = JOIN r2 WITH Expr::Expr::getFullyConverted_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0 'sub'
210 ~1% {2} r4 = JOIN r3 WITH SimpleRangeAnalysis::SimpleRangeAnalysisCached::exprMightOverflowNegatively#f ON FIRST 1 OUTPUT Lhs.2 'sub', Lhs.1
210 ~0% {3} r5 = JOIN r4 WITH Expr::Expr::getFullyConverted_dispred#ff ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'sub', Rhs.1
210 ~1% {3} r6 = JOIN r5 WITH ComparisonOperation::RelationalOperation::getLesserOperand_dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'sub', Lhs.2
59 ~2% {4} r7 = JOIN r6 WITH Expr::Expr::getValue_dispred#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Lhs.2, Rhs.1, toInt(Rhs.1)
17 ~0% {4} r8 = SELECT r7 ON In.3 = 0
17 ~0% {2} r9 = SCAN r8 OUTPUT In.1, In.0 'sub'
8 ~0% {2} r10 = JOIN r9 WITH Expr::Expr::getUnspecifiedType_dispred#bb ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'sub'
8 ~0% {1} r11 = JOIN r10 WITH Type::IntegralType::isUnsigned_dispred#f ON FIRST 1 OUTPUT Lhs.1 'sub'
return r11
Tuple counts for UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff/2@i2#61800weu after 1ms:
8 ~0% {2} r1 = JOIN UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev_delta WITH UnsignedDifferenceExpressionComparedZero::interestingSubExpr#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'sub'
0 ~0% {2} r2 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
1 ~0% {2} r3 = JOIN r1 WITH DataFlowUtil::localFlowStep#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
0 ~0% {3} r4 = JOIN UnsignedDifferenceExpressionComparedZero::isGuarded#fff#prev_delta WITH UnsignedDifferenceExpressionComparedZero::interestingSubExpr#f ON FIRST 1 OUTPUT Lhs.1, Lhs.0 'sub', Lhs.2
0 ~0% {3} r5 = JOIN r4 WITH DataFlowUtil::TExprNode#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n', Lhs.2
0 ~0% {2} r6 = JOIN r5 WITH UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev ON FIRST 2 OUTPUT Lhs.2, Lhs.0 'sub'
0 ~0% {2} r7 = JOIN r6 WITH DataFlowUtil::TExprNode#ff ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1 'n'
1 ~0% {2} r8 = r3 UNION r7
1 ~0% {2} r9 = r2 UNION r8
...
2022-01-10 17:28:14 +00:00
Mathias Vorreiter Pedersen
f2d6bcd767
C++: Fix join order in 'isGuarded'.
...
Before:
Tuple counts for UnsignedDifferenceExpressionComparedZero::isGuarded#bff/3@ec24001m after 1.7s:
97431 ~0% {2} r1 = JOIN UnsignedDifferenceExpressionComparedZero::isGuarded#bff#join_rhs WITH project#BasicBlocks::Cached::basic_block_member ON FIRST 1 OUTPUT Rhs.1, Lhs.0 'sub'
11809769 ~1% {2} r2 = JOIN r1 WITH Guards::GuardCondition::controls_dispred#fff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1 'sub', Rhs.1
11809769 ~0% {4} r3 = JOIN r2 WITH project#BasicBlocks::Cached::basic_block_member ON FIRST 1 OUTPUT Lhs.1, Rhs.1, false, Lhs.0 'sub'
629277 ~4% {7} r4 = JOIN r3 WITH Guards::GuardCondition::ensuresLt_dispred#ffffff_045123#join_rhs ON FIRST 3 OUTPUT Lhs.3 'sub', Lhs.0, Lhs.1, false, Rhs.3 'left', Rhs.4 'right', Rhs.5
628120 ~4% {7} r5 = SELECT r4 ON In.6 >= 0
628120 ~1% {3} r6 = SCAN r5 OUTPUT In.0 'sub', In.4 'left', In.5 'right'
return r6
After:
Tuple counts for UnsignedDifferenceExpressionComparedZero::isGuarded#fff/3@i2#a5071x3a after 392ms:
103763 ~0% {2} r1 = SCAN UnsignedDifferenceExpressionComparedZero::exprIsSubLeftOrLess#ff#prev_delta OUTPUT In.0 'sub', 26
103763 ~0% {1} r2 = JOIN r1 WITH exprs ON FIRST 2 OUTPUT Lhs.0 'sub'
97431 ~0% {3} r3 = JOIN r2 WITH project#BasicBlocks::Cached::basic_block_member ON FIRST 1 OUTPUT Rhs.1, false, Lhs.0 'sub'
629277 ~0% {7} r4 = JOIN r3 WITH Guards::GuardCondition::ensuresLt_dispred#ffffff_450123#join_rhs ON FIRST 2 OUTPUT Lhs.2 'sub', Lhs.0, false, Rhs.2, Rhs.3 'left', Rhs.4 'right', Rhs.5
628120 ~0% {7} r5 = SELECT r4 ON In.6 >= 0
628120 ~1% {6} r6 = SCAN r5 OUTPUT In.0 'sub', In.1, In.3, In.4 'left', In.5 'right', In.6
628120 ~1% {6} r7 = r6 AND NOT UnsignedDifferenceExpressionComparedZero::isGuarded#fff#prev(Lhs.0 'sub', Lhs.3 'left', Lhs.4 'right')
628120 ~0% {5} r8 = SCAN r7 OUTPUT In.2, In.1, In.0 'sub', In.3 'left', In.4 'right'
628120 ~1% {3} r9 = JOIN r8 WITH Guards::GuardCondition::controls_dispred#fff ON FIRST 2 OUTPUT Lhs.2 'sub', Lhs.3 'left', Lhs.4 'right'
return r9
2022-01-10 17:03:40 +00:00
Tony Torralba
fbebf5e953
Move change note to new location
2022-01-10 17:27:02 +01:00
Tony Torralba
0e738622df
Merge branch 'main' into atorralba/promote-log-injection
2022-01-10 17:24:25 +01:00
Tony Torralba
cc92ce2754
Fix QLDoc
2022-01-10 17:13:13 +01:00
Tony Torralba
e1e5e78464
Apply suggestions from code review
...
- Update CleartextStorage library to latest refactor
- Move change note to new location
2022-01-10 17:10:55 +01:00
Tony Torralba
d17e973b6b
Apply suggestions from code review
...
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com >
2022-01-10 17:09:41 +01:00
Tony Torralba
ec8c234872
Fix predicate name
2022-01-10 17:09:41 +01:00
Tony Torralba
55dc783f28
Move from experimental and refactor
2022-01-10 17:09:37 +01:00
CodeQL CI
d912a98b02
Merge pull request #7171 from asgerf/js/mad
...
Approved by erik-krogh
2022-01-10 13:17:09 +00:00
Anders Schack-Mulligen
f590d2566e
DataFlow: Fix test.
2022-01-10 11:25:52 +01:00
Anders Schack-Mulligen
c8a6798c05
Ruby: Workaround for optimiser problem.
...
A size 1 DataFlowType causes misoptimisations.
2022-01-10 11:21:18 +01:00
Tom Hvitved
d2ebbe0819
Merge pull request #7469 from hvitved/csharp/promote-adhoc-consistency-checks
...
C#: Promote existing ad-hoc consistency checks to consistency queries
2022-01-10 11:10:25 +01:00
Michael Nebel
533fc7a912
Merge pull request #7532 from michaelnebel/csharp/file-scoped-namespace
...
C#: Make support for file scoped namespace declarations.
2022-01-10 09:02:18 +01:00
Mathias Vorreiter Pedersen
a5ccd6a23b
Merge pull request #7521 from rdmarsh2/rdmarsh2/cpp/use-guards-in-overflow
2022-01-09 14:09:04 +00:00
Robert Marsh
67fb48fcc1
C++: use range analysis for hex format lengths
...
The "new" result on line 189 is a tighter bound than was previously
established, not a newly introduced location.
2022-01-07 16:16:22 -05:00
Robert Marsh
fa9242befe
C++: Add tests for bounded hex format values
2022-01-07 16:08:53 -05:00
Robert Marsh
673399719e
C++: autoformat DataFlowPrivate
2022-01-07 15:23:24 -05:00
Felicity Chapman
3b0d55e2f9
Merge pull request #5893 from niroshan/patch-1
...
Update README.md
2022-01-07 19:33:41 +00:00
Robert Marsh
78b8d113bb
C++: PR comments on DataFlow Position
2022-01-07 14:21:56 -05:00
Robert Marsh
4322a39807
C++: fix typo in Overflow.qll abs handling
2022-01-07 14:09:47 -05:00
Erik Krogh Kristensen
cc5e9fea77
add test
2022-01-07 18:44:04 +01:00
Erik Krogh Kristensen
f7a63d5ea0
remove duplicated line
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
c8d29a9cf1
sync files
2022-01-07 18:38:02 +01:00
Erik Krogh Kristensen
1a8b6d7414
recognize ranges without upper bounds
2022-01-07 18:38:01 +01:00
Erik Krogh Kristensen
acaf294bee
support a limited number of regexp ranges
2022-01-07 18:36:30 +01:00
Robert Marsh
a126154dfb
C++: use -1 for this in dataflow Position
2022-01-07 11:39:26 -05:00
Robert Marsh
1890a14026
C++: IPA for pointer arg instead of negative index
...
This takes advantage of the new ArgumentPosition and ParameterPosition
types in the shared DataFlow library interface to represent indirections
with an IPA type rather than the negative-index system in use previously
2022-01-07 11:39:26 -05:00
Robert Marsh
4f23cce63b
C++: Accept more test output
2022-01-07 11:27:45 -05:00
Michael Nebel
23b8444348
C#: Cleanup C# source code file and add a test case for namespace delcarations.
2022-01-07 16:04:43 +01:00
Michael Nebel
b8f6d17bc1
C#: Add test for file scoped namespace.
2022-01-07 16:04:43 +01:00
Michael Nebel
a6d847b532
C#: Make support for FileScoped namespace declaration in the extrator.
2022-01-07 16:04:43 +01:00
Erik Krogh Kristensen
bb94c42a35
explicit this
...
Co-authored-by: Taus <tausbn@github.com >
2022-01-07 15:22:21 +01:00
Mathias Vorreiter Pedersen
4ee653378e
Merge pull request #7517 from MathiasVP/avoid-self-joins-in-toctou-query
...
C++: Remove bad self joins in `cpp/toctou-race-condition`.
2022-01-07 13:08:30 +00:00
Michael Nebel
94c1a489e0
Merge pull request #7507 from michaelnebel/csharp-libdataflow-cleanup
...
C#: Refactor and cleanup LibraryTypeDataFlow
2022-01-07 13:16:08 +01:00
Michael Nebel
17219eff61
Merge pull request #7530 from github/workflow/coverage/update
...
Update CSV framework coverage reports
2022-01-07 13:15:49 +01:00
Michael Nebel
929f6ca578
C#: Address review comments.
2022-01-07 10:26:33 +01:00
Michael Nebel
d3368dcc23
C#: Remove the LibraryTypeDataFlow file as the remaining code is dead.
2022-01-07 10:26:32 +01:00
Michael Nebel
9b47249f6a
C#: Migrate the legacy clearContent flow summaries to the new framework.
2022-01-07 10:26:32 +01:00
Michael Nebel
fd317c2e7b
C#: Move RecordConstructorFlow.
2022-01-07 10:26:32 +01:00
Michael Nebel
fb950848c7
C#: Remove unused case, when converting SummaryComponent stacks.
2022-01-07 10:26:32 +01:00
Michael Nebel
5a0e6ed8e6
C#: Remove unsued predicates in CallableFlowSource and subclasses.
2022-01-07 10:26:32 +01:00
Michael Nebel
19914aba89
C#: Remove CallableFlowSink.
2022-01-07 10:26:32 +01:00
Michael Nebel
ed4d09bc8b
C#: Remove unneeded imports.
2022-01-07 10:26:32 +01:00
Michael Nebel
d042c4b3e4
C#: Remove unsused type,class and module AccessPath.
2022-01-07 10:26:32 +01:00
Michael Nebel
d5768bf4ed
C#: Remove more empty predicates.
2022-01-07 10:26:31 +01:00
Michael Nebel
a6b79926b2
C#: Remove unused predicate toCallableFlowSink.
2022-01-07 10:26:31 +01:00