Robert Marsh
537db53a8d
C++/C#: improve qldoc on IR get*ResultExpression
2020-05-01 14:12:44 -07:00
Nick Rolfe
4ce896b856
Merge pull request #3378 from matt-gretton-dann/codeql-c-extractor/49-consteval
...
Add support for C++20's consteval specifier
2020-05-01 17:56:56 +01:00
Geoffrey White
c8292e4b8e
Merge pull request #3148 from jbj/minmax-to-unique
...
C++: Replace "min = max" with "unique"
2020-05-01 17:43:32 +01:00
Jonas Jensen
4ec0ae6698
Merge pull request #3388 from geoffw0/cleanupstuff
...
C++: Small tidy up
2020-05-01 17:29:12 +02:00
Mathias Vorreiter Pedersen
2e3463740d
Merge pull request #3382 from jbj/escape-qualifier
...
C++: Addresses may escape through call qualifiers
2020-05-01 16:23:46 +02:00
Geoffrey White
200d7ed360
C++: Remove if-else.
2020-05-01 14:26:34 +01:00
Geoffrey White
4907677351
C++: Try to improve QLDoc on deconstructSizeExpr.
2020-05-01 14:26:33 +01:00
Jonas Jensen
36bdcfa42d
C++: Remove an unneeded local-flow case
...
This case was added in dccc0f4db . The surrounding code has changed a lot
since then, and the case no longer seems to have an effect except to
create some dead ends and possibly cycles in the local flow graph.
2020-05-01 15:08:15 +02:00
Jonas Jensen
9fc27e9130
C++: Fix "is constant" check
...
The check was supposed to check for constant type, not constant value.
This fixes a false negative that appeared in
`LargeParameter/test.cpp:106`.
2020-05-01 09:04:31 +02:00
Jonas Jensen
8ffa124bf9
C++: Addresses may escape through call qualifiers
...
Also clarify the docs on `Call` to decrease the likelyhood of such an
omission happening again.
The updated test reflects that `f1.operator()` lets the address of `f1`
escape from the caller.
2020-04-30 14:27:40 +02:00
Matthew Gretton-Dann
5b29a49c73
C++: Add library support for consteval
2020-04-29 14:31:35 +01:00
Nick Rolfe
55301b4b2f
Merge pull request #3074 from matt-gretton-dann/codeql-c-extractor/50-char8_t
...
Add support for C++20's char8_t type.
2020-04-29 12:15:25 +01:00
Mathias Vorreiter Pedersen
8a1d96b313
Merge pull request #3374 from jbj/PartialDefinition-refactor
...
C++: Refactor `PartialDefinition` charpred
2020-04-29 13:03:40 +02:00
Jonas Jensen
de3fa8e68b
Merge pull request #3337 from Cornelius-Riemenschneider/alloc-type
...
C++: Allocation.qll: Provide getAllocatedElementType predicate for AllocationExprs.
2020-04-29 11:55:02 +02:00
Matthew Gretton-Dann
a6947e0296
C++: Complete support for char8_t
2020-04-29 10:18:13 +01:00
Matthew Gretton-Dann
2d898af2fe
C++: Add library support for char8_t type.
2020-04-29 10:18:13 +01:00
Shati Patel
5c80cd5032
Merge branch 'rc/1.24' into mergeback
2020-04-29 08:05:53 +01:00
Jonas Jensen
796041af72
C++: Refactor PartialDefinition charpred
...
This class used `newtype` for seemingly no reason. The new code is
shorter and should be faster as well.
2020-04-28 17:10:25 +02:00
Mathias Vorreiter Pedersen
b1a94d8809
Merge branch 'master' into get-an-assigned-value-join-order
2020-04-27 14:11:30 +02:00
Tom Hvitved
d28c4fb0f5
Merge pull request #3202 from jbj/pathStep-join-unique
...
Java/C++/C#: Use `unique` to improve join order fix
2020-04-27 13:06:27 +02:00
Cornelius Riemenschneider
3f7d68178c
Use stripTopLevelSpecifiers() to get the allocated element type for malloc().
2020-04-27 12:46:14 +02:00
Cornelius Riemenschneider
92e8604fa1
Provide getAllocatedElementType predicate for AllocationExprs.
...
This predicate tries to determine the type of the allocated elements of an allocation expression.
2020-04-27 12:41:19 +02:00
Geoffrey White
230e5a3a9a
Merge pull request #3326 from Cornelius-Riemenschneider/alloc-size-mul
...
C++: Allocation.qll: Analyze common pattern of malloc() invocations to provide more accurate getSizeMult()
2020-04-27 11:18:54 +01:00
Jonas Jensen
20c956e0a9
Merge pull request #3320 from Semmle/rdmarsh/cpp/taint-tracking-util-port
...
C++: move logic from DefaultTaintTracking into TaintTrackingUtil
2020-04-27 11:34:03 +02:00
Robert Marsh
4eea62cbde
Merge pull request #3345 from Cornelius-Riemenschneider/openssl-allocators
...
C++: Allocation.qll: Add support for openssl allocation/deallocation functions.
2020-04-24 14:48:05 -07:00
Mathias Vorreiter Pedersen
98c2fd8401
Merge branch 'master' into get-an-assigned-value-join-order
2020-04-24 15:03:59 +02:00
Jonas Jensen
d98e956c2b
Merge pull request #3322 from felicitymay/merge-124-master
...
Merge rc/1.24 into master
2020-04-24 08:48:54 +02:00
Cornelius Riemenschneider
c25eb19b18
Add support for openssl allocation/deallocation functions.
2020-04-24 01:57:14 +02:00
Cornelius Riemenschneider
0ea7fedeb0
Address review and fix bug in deconstructSizeExpr/3.
...
Logic is hard, and I made a mistake inverting the formula for the second case, so the
predicate never held for a sizeExpr like sizeof(int)*sizeof(void).
Now, this case is correctly handled by the fallback.
2020-04-23 16:39:29 +02:00
Cornelius Riemenschneider
492f1f446a
Remove pragma[inline] from deconstructSizeExpr/3.
2020-04-23 15:53:11 +02:00
Mathias Vorreiter Pedersen
deff2820c2
C++: Modernize getAnAssignedValue following PR comments
2020-04-23 14:14:35 +02:00
Jonas Jensen
37e3bc4b3e
C++: invoke unique without | |
...
Based on PR feedback. This will avoid a syntactic wart and make the
invocation do the right thing both with and without
`language[monotonicAggregates]`.
2020-04-23 13:10:05 +02:00
Jonas Jensen
312e6229fb
Merge pull request #3330 from MathiasVP/libc-assert
...
C++: Generalize charpred of LibcAssert
2020-04-23 13:06:41 +02:00
Cornelius Riemenschneider
a33b7f8c99
Make getSizeMult() functional.
2020-04-23 12:15:31 +02:00
Jonas Jensen
d6f77c0f98
Merge pull request #3328 from MathiasVP/literal-comment
...
C++: Remove unnecessary part of comment
2020-04-23 11:10:16 +02:00
Mathias Vorreiter Pedersen
0fb534c79e
C++: Fix join order in getAnAssignedValue
2020-04-23 11:04:40 +02:00
Jonas Jensen
f696594d35
Merge pull request #3295 from MathiasVP/field-flow-single-struct
...
C++: Add PostUpdateNode for updates to structs with no chi instructions
2020-04-23 10:02:10 +02:00
Jonas Jensen
cbed175931
Merge pull request #3273 from Semmle/rdmarsh/cpp/RemoteFlowSource-model
...
C++: Add remote flow sources via models
2020-04-23 09:54:40 +02:00
Mathias Vorreiter Pedersen
1016a0c0db
C++: Generalize charpred of LibcAssert
2020-04-23 09:48:30 +02:00
Mathias Vorreiter Pedersen
7b51d0c8a5
C++: Remove unnecessary part of comment
2020-04-23 08:35:44 +02:00
Cornelius Riemenschneider
293e6466d4
AllocationExpr.getSizeMult() now analyzes the size expression of function calls.
...
This yields more precise size information in a lot of the common cases of C allocation code,
as the common pattern malloc(count * sizeof(type)) is now understood.
2020-04-23 02:05:31 +02:00
Robert Marsh
0dc797d288
C++: autoformat ModelUtil.qll
2020-04-22 16:14:58 -07:00
Robert Marsh
ac22e7950c
C++: autoformat FlowSources.qll
2020-04-22 16:11:33 -07:00
Robert Marsh
471f536326
Merge pull request #3307 from dbartol/dbartol/BinaryConditional
...
C++: IR translation for binary conditional operator
2020-04-22 15:01:16 -07:00
Felicity Chapman
89bf35cd43
Merge branch 'rc/1.24' into merge-124-master
...
Conflicts:
change-notes/1.24/analysis-javascript.md
Resolved in favor of the rc/1.24 branch
2020-04-22 19:01:47 +01:00
Dave Bartolomeo
163ecd97de
Merge pull request #3277 from geoffw0/rangeshift
...
C++: Support for & and >> in SimpleRangeAnalysis
2020-04-22 11:36:36 -04:00
Jonas Jensen
448bd2be87
C++: Make Declaration not abstract
...
It looks like this change will stop `SignedOverflowCheck.ql` from
needlessly re-evaluating several cached stages.
2020-04-22 17:34:18 +02:00
Dave Bartolomeo
66381e89ef
C++: Add comment from PR feedback
2020-04-22 08:11:43 -04:00
Robert Marsh
9e0d6e8aa0
C++: move taint step cases to TaintTrackingUtil
2020-04-22 01:38:00 -07:00
Geoffrey White
2e392516c2
Apply suggestions from code review
...
Co-Authored-By: Dave Bartolomeo <dbartol@github.com >
2020-04-22 09:09:16 +01:00