Mathias Vorreiter Pedersen
a035c9b4d1
C++: Also update source-sink tests.
2025-03-14 20:04:45 +00:00
Mathias Vorreiter Pedersen
b7d1c56372
C++: Add change note.
2025-03-14 18:53:09 +00:00
Mathias Vorreiter Pedersen
636150ea4f
C++: Adjust tests and accept test changes.
2025-03-14 18:43:33 +00:00
Mathias Vorreiter Pedersen
78697903fc
C++: Move ATL models to ATL namespace.
2025-03-14 18:43:06 +00:00
Anders Schack-Mulligen
c2309442d5
C++: Accept qltest changes.
2025-03-14 10:51:28 +01:00
Mathias Vorreiter Pedersen
90774c03be
C++: Remove yet another DefinitionExt reference.
2025-03-14 10:51:27 +01:00
Anders Schack-Mulligen
35687ea698
C++: Merge two cached stages.
2025-03-14 10:51:27 +01:00
Anders Schack-Mulligen
7bfd47a924
C++: Fix bad join order.
...
Before:
[2025-03-12 10:27:53] Evaluated non-recursive predicate SsaInternals::UseImpl.hasIndexInBlock/2#dispred#1e34a5af@e87543ui in 935ms (size: 8905695).
Evaluated relational algebra for predicate SsaInternals::UseImpl.hasIndexInBlock/2#dispred#1e34a5af@e87543ui with tuple counts:
{3} r1 = SsaInternals::DirectUseImpl#a58aae88 AND NOT `_ArithmeticOperation::PostfixCrementOperation#17623ada_Expr::UnaryOperation.getOperand/0#dispred#990__#antijoin_rhs`(FIRST 3)
8579337 ~4% {2} | SCAN OUTPUT In.1, In.0
8579337 ~0% {2} | JOIN WITH `Operand::Operand.getUse/0#dispred#427b49d0` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
8579337 ~0% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
48215 ~2% {2} r2 = SCAN SsaInternals::GlobalUse#9cd323b4 OUTPUT In.2, In.0
35467318 ~3% {2} | JOIN WITH `SSAConstruction::getInstructionEnclosingIRFunction/1#5443f355_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
48189 ~0% {2} r3 = JOIN r2 WITH Instruction::ReturnInstruction#28bfb7eb ON FIRST 1 OUTPUT Lhs.0, Lhs.1
12332 ~0% {2} r4 = JOIN r2 WITH Instruction::UnreachedInstruction#774c7a34 ON FIRST 1 OUTPUT Lhs.0, Lhs.1
60521 ~0% {2} r5 = r3 UNION r4
60521 ~2% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
39316 ~0% {2} r6 = JOIN SsaInternals::FinalParameterUse#c1f84700_10#join_rhs WITH `Parameter::Parameter.getFunction/0#dispred#803faca2` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
43821265 ~0% {2} | JOIN WITH `Instruction::Instruction.getEnclosingFunction/0#dispred#cb8ccc56_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
39194 ~0% {2} r7 = JOIN r6 WITH Instruction::ReturnInstruction#28bfb7eb ON FIRST 1 OUTPUT Lhs.0, Lhs.1
21255 ~2% {2} r8 = JOIN r6 WITH Instruction::UnreachedInstruction#774c7a34 ON FIRST 1 OUTPUT Lhs.0, Lhs.1
60449 ~0% {2} r9 = r7 UNION r8
60449 ~3% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
8784725 ~1% {5} r10 = JOIN `_SsaInternals::DirectUseImpl#a58aae88_SsaInternals::DirectUseImpl.getBase/0#dispred#4b8c43d0_SsaInte__#shared` WITH `SsaInternals::DirectUseImpl.getBase/0#dispred#4b8c43d0` ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2, Lhs.3
8784725 ~0% {5} | JOIN WITH `cached_SSAConstruction::getInstructionAst/1#d0d95b50` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
210435 ~4% {5} | JOIN WITH `Expr::UnaryOperation.getOperand/0#dispred#990de484#bf_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
205388 ~0% {4} | JOIN WITH ArithmeticOperation::PostfixCrementOperation#17623ada ON FIRST 1 OUTPUT Lhs.4, Lhs.3, Lhs.2, Lhs.1
205388 ~4% {3} | JOIN WITH `__IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs__ArithmeticOperation::PostfixCrementOperat__#join_rhs` ON FIRST 3 OUTPUT Rhs.4, Lhs.3, Rhs.3
205388 ~0% {3} | JOIN WITH `Operand::Operand.getUse/0#dispred#427b49d0` ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
205388 ~1% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_021#join_rhs` ON FIRST 2 OUTPUT Lhs.2, Lhs.0, Rhs.2
8905695 ~0% {3} r11 = r1 UNION r5 UNION r9 UNION r10
return r11
After:
[2025-03-12 11:12:48] Evaluated non-recursive predicate SsaInternals::hasReturnPosition/3#02f7eab8@bc405c4l in 3ms (size: 49368).
Evaluated relational algebra for predicate SsaInternals::hasReturnPosition/3#02f7eab8@bc405c4l with tuple counts:
49368 ~3% {1} r1 = Instruction::ReturnInstruction#28bfb7eb UNION Instruction::UnreachedInstruction#774c7a34
49368 ~0% {2} | JOIN WITH `cached_SSAConstruction::getInstructionEnclosingIRFunction/1#5443f355` ON FIRST 1 OUTPUT Lhs.0, Rhs.1
49368 ~2% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
return r1
[2025-03-12 11:12:54] Evaluated non-recursive predicate SsaInternals::UseImpl.hasIndexInBlock/2#dispred#1e34a5af@6e30cduo in 549ms (size: 8905695).
Evaluated relational algebra for predicate SsaInternals::UseImpl.hasIndexInBlock/2#dispred#1e34a5af@6e30cduo with tuple counts:
48215 ~2% {2} r1 = SCAN SsaInternals::GlobalUse#9cd323b4 OUTPUT In.2, In.0
60521 ~2% {3} | JOIN WITH `SsaInternals::hasReturnPosition/3#02f7eab8` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
50725 ~0% {2} r2 = JOIN `IRFunctionBase::IRFunctionBase.getFunction/0#dispred#b024672e_10#join_rhs` WITH `Parameter::Parameter.getFunction/0#dispred#803faca2_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
39231 ~2% {2} | JOIN WITH SsaInternals::FinalParameterUse#c1f84700_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
60449 ~3% {3} | JOIN WITH `SsaInternals::hasReturnPosition/3#02f7eab8` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
{3} r3 = SsaInternals::DirectUseImpl#a58aae88 AND NOT `_ArithmeticOperation::PostfixCrementOperation#17623ada_Expr::UnaryOperation.getOperand/0#dispred#990__#antijoin_rhs`(FIRST 3)
8579337 ~1% {2} | SCAN OUTPUT In.1, In.0
8579337 ~0% {2} | JOIN WITH `Operand::Operand.getUse/0#dispred#427b49d0` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
8579337 ~1% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Rhs.2
8784725 ~0% {5} r4 = JOIN `_SsaInternals::DirectUseImpl#a58aae88_SsaInternals::DirectUseImpl.getBase/0#dispred#4b8c43d0_SsaInte__#shared` WITH `SsaInternals::DirectUseImpl.getBase/0#dispred#4b8c43d0` ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1, Lhs.2, Lhs.3
8784725 ~0% {5} | JOIN WITH `cached_SSAConstruction::getInstructionAst/1#d0d95b50` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
210435 ~0% {5} | JOIN WITH `Expr::UnaryOperation.getOperand/0#dispred#990de484#bf_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Lhs.3, Lhs.4
205388 ~2% {4} | JOIN WITH ArithmeticOperation::PostfixCrementOperation#17623ada ON FIRST 1 OUTPUT Lhs.4, Lhs.3, Lhs.2, Lhs.1
205388 ~0% {3} | JOIN WITH `__IRBlock::Cached::getInstruction/2#627f9c61_201#join_rhs__ArithmeticOperation::PostfixCrementOperat__#join_rhs` ON FIRST 3 OUTPUT Rhs.4, Lhs.3, Rhs.3
205388 ~0% {3} | JOIN WITH `Operand::Operand.getUse/0#dispred#427b49d0` ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
205388 ~0% {3} | JOIN WITH `IRBlock::Cached::getInstruction/2#627f9c61_021#join_rhs` ON FIRST 2 OUTPUT Lhs.2, Lhs.0, Rhs.2
8905695 ~0% {3} r5 = r1 UNION r2 UNION r3 UNION r4
return r5
2025-03-14 10:51:27 +01:00
Anders Schack-Mulligen
ba13d7fffe
C++: Remove superfluous disjunct.
2025-03-14 10:51:26 +01:00
Anders Schack-Mulligen
ecb5e7ad07
C++: Fix spurious ExprNode fanout in DataFlowIntegration.
2025-03-14 10:51:26 +01:00
Anders Schack-Mulligen
b5a2f5d3ff
C++: Remove useless ipa wrapper.
2025-03-14 10:51:25 +01:00
Anders Schack-Mulligen
4bd35b10fc
C++: Delete dead code.
2025-03-14 10:51:25 +01:00
Anders Schack-Mulligen
6ba1d2ef14
C++: Replace DefinitionExt usage with Definition.
2025-03-14 10:51:24 +01:00
Anders Schack-Mulligen
9375e571b1
C++: Use SSA data flow integration module.
2025-03-14 10:51:24 +01:00
Anders Schack-Mulligen
c7ff2f55b5
C++: Remove yet another DefinitionExt reference.
2025-03-14 10:51:23 +01:00
Anders Schack-Mulligen
e01552c3f0
C++: Remove another DefinitionExt reference.
2025-03-14 10:51:23 +01:00
Anders Schack-Mulligen
c5755ba8d4
C++: Remove a DefinitionExt reference.
2025-03-14 10:51:23 +01:00
Anders Schack-Mulligen
0c17786ed0
C++: Delete unused predicate
2025-03-14 10:51:22 +01:00
Jeroen Ketema
de2fb037d0
Merge pull request #18980 from LeStarch/jpl-c-basic-integral-types-fix
...
Fixing BasicIntTypes to allow C Standard Integers and 'bool'
2025-03-14 08:06:55 +01:00
M Starch
7b5d604607
Updating tests to allow new typedefs
2025-03-13 15:04:37 -07:00
M Starch
7f4905987e
Addressing review comments
...
Reduced the category to minorAnalysis. Handled bools via a instanceof with BoolType. Formatted the query correctly.
2025-03-13 11:12:35 -07:00
Mathias Vorreiter Pedersen
6f4e9ed136
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2025-03-13 16:00:36 +00:00
Mathias Vorreiter Pedersen
0e5fa1b5eb
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2025-03-13 16:00:23 +00:00
Mathias Vorreiter Pedersen
470321e8b6
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2025-03-13 16:00:15 +00:00
Mathias Vorreiter Pedersen
9cde2bb94d
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2025-03-13 15:59:57 +00:00
Mathias Vorreiter Pedersen
68b414d169
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2025-03-13 15:59:48 +00:00
Mathias Vorreiter Pedersen
0fe77154e1
C++: Add library change note.
2025-03-13 14:29:34 +00:00
Mathias Vorreiter Pedersen
aeb1acba97
C++: Use the new API in queries.
2025-03-12 17:09:05 +00:00
Mathias Vorreiter Pedersen
66e8b2d7e5
C++: Add an 'asDefinition' overload to check if a definition is certain or not.
2025-03-12 17:07:07 +00:00
M Starch
f01737a4c0
Fixing BasicIntTypes to allow C Standard Integers and 'bool'
...
The purpose of this check is to ensure that all integral types used by the code point to some fixed size type (e.g. an unsigned 8-bit integer). However; the previous implementation only allowed JPL style typedefs (i.e. U8) and ignored C standard integer types (i.e. uint8_t). This causes the query to false-positive when a typedef resolves to a C standard int type.
'bool' has also be allowed as part of the exclusions list as it represents distinct values 'true' and 'false' in C++ code.
2025-03-11 14:56:57 -07:00
Mathias Vorreiter Pedersen
f9a7ac4e89
C++: Accept test changes.
2025-03-07 19:59:06 +00:00
Mathias Vorreiter Pedersen
b06902a3b1
C++: Share more indirect operands and instructions.
2025-03-07 19:59:05 +00:00
Jeroen Ketema
87ee191409
Merge pull request #18928 from jketema/desc
...
C++: Improve query description and fix alignment of the text
2025-03-07 10:47:31 +01:00
Mathias Vorreiter Pedersen
38bf9c6835
Merge pull request #18908 from aschackmull/cpp/branchlimit-adjustment-refactor
...
C++: Change countNumberOfBranchesUsingParameter to match qldoc closer.
2025-03-05 11:21:38 +00:00
Jeroen Ketema
e50ebfc8c2
C++: Improve query description and fix alignment of the text
2025-03-04 20:50:27 +01:00
Jeroen Ketema
795a2e1175
Merge pull request #18923 from jketema/template-arguments
...
C++: Update template test to also output the value of template arguments
2025-03-04 17:56:14 +01:00
Jeroen Ketema
324499e447
C++: Update template test to also output the value of template arguments
...
These values are currently the same as the result that `getTemplateArgument`
yields. However, this will change with the upcoming frontend update.
2025-03-04 16:24:21 +01:00
Enrico Steffinlongo
e230166fe2
Add C++ query to extract the status of include file resolution
2025-03-04 13:57:17 +00:00
Geoffrey White
7f56c67544
Merge pull request #18837 from geoffw0/overflowbuffer
...
C++: Improve and promote cpp/overflow-buffer
2025-03-03 14:17:12 +00:00
Anders Schack-Mulligen
5d91f2e119
C++: Change countNumberOfBranchesUsingParameter to match qldoc closer.
2025-03-03 15:14:28 +01:00
Geoffrey White
7169c4be48
C++: Another attempt to make the fix more solid. I believe it can't produce negative numbers now.
2025-02-28 14:21:58 +00:00
Geoffrey White
998bec1efb
C++: Fix the bug.
2025-02-27 21:24:07 +00:00
Geoffrey White
51d916263d
C++: Another test.
2025-02-27 21:19:05 +00:00
Geoffrey White
3d19e2ad4a
C++: Static buffer overflow change note.
2025-02-27 16:46:53 +00:00
Geoffrey White
1354bebd7c
C++: Fix an issue with padding.
2025-02-26 17:43:25 +00:00
Geoffrey White
dbab845295
C++: Effect of this branch on the new test.
2025-02-26 17:18:48 +00:00
Geoffrey White
abb88e3dba
C++: Add a test file that was internal (results as on main).
2025-02-26 17:14:43 +00:00
Geoffrey White
c41add896f
C++: Accept regressions in SAMATE based test cases.
2025-02-26 16:34:10 +00:00
Geoffrey White
a7ac6b137b
C++: Second change note.
2025-02-25 17:02:23 +00:00
Geoffrey White
7d7498ee32
C++: Avoid problems when a variable has multiple types.
2025-02-25 16:55:13 +00:00