Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize dataflow configurations #468

Merged
merged 2 commits into from
Dec 8, 2023
Merged

Conversation

jketema
Copy link
Collaborator

@jketema jketema commented Dec 1, 2023

Description

Note that this targets main. Let me know if retargeting to next makes more sense.

The DataFlow::Configuration and TaintTracking::Configuration classes are going to be deprecated soon. Modernize the queries that use these by switching them over to the new DataFlow::ConfigSig.

This should not affect performance, but it's probably still good to test this. There are also some small changes to some of the paths in the test results. These look correct to me.

While doing this work, made the naming of the configurations more consistent. They now all end in Config.

Change request type

  • Release or process automation (GitHub workflows, internal scripts)
  • Internal documentation
  • External documentation
  • Query files (.ql, .qll, .qls or unit tests)
  • External scripts (analysis report or other code shipped as part of a release)

Rules with added or modified queries

  • No rules added
  • Queries have been added for the following rules:
    • rule number here
  • Queries have been modified for the following rules:
    • rule number here

Release change checklist

A change note (development_handbook.md#change-notes) is required for any pull request which modifies:

  • The structure or layout of the release artifacts.
  • The evaluation performance (memory, execution time) of an existing query.
  • The results of an existing query in any circumstance.

If you are only adding new rule queries, a change note is not required.

Author: Is a change note required?

  • Yes
  • No

🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.

  • Confirmed

Reviewer: Confirm that either a change note is not required or the change note is required and has been added.

  • Confirmed

Query development review checklist

For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:

Author

  • Have all the relevant rule package description files been checked in?
  • Have you verified that the metadata properties of each new query is set appropriately?
  • Do all the unit tests contain both "COMPLIANT" and "NON_COMPLIANT" cases?
  • Are the alert messages properly formatted and consistent with the style guide?
  • Have you run the queries on OpenPilot and verified that the performance and results are acceptable?
    As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
  • Does the query have an appropriate level of in-query comments/documentation?
  • Have you considered/identified possible edge cases?
  • Does the query not reinvent features in the standard library?
  • Can the query be simplified further (not golfed!)

Reviewer

  • Have all the relevant rule package description files been checked in?
  • Have you verified that the metadata properties of each new query is set appropriately?
  • Do all the unit tests contain both "COMPLIANT" and "NON_COMPLIANT" cases?
  • Are the alert messages properly formatted and consistent with the style guide?
  • Have you run the queries on OpenPilot and verified that the performance and results are acceptable?
    As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
  • Does the query have an appropriate level of in-query comments/documentation?
  • Have you considered/identified possible edge cases?
  • Does the query not reinvent features in the standard library?
  • Can the query be simplified further (not golfed!)

@jketema jketema force-pushed the config-update branch 2 times, most recently from 67ab0aa to ef99ccc Compare December 1, 2023 21:59
@jketema jketema marked this pull request as ready for review December 2, 2023 08:04
…PointerType.ql

Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QL changes LGTM. I did not look at the expected-file changes.

@aschackmull
Copy link
Contributor

I expect the test differences to mostly be due to github/codeql#13717

@lcartey
Copy link
Collaborator

lcartey commented Dec 7, 2023

/performance-test

@jsinglet
Copy link
Contributor

jsinglet commented Dec 7, 2023

/test-performance

Copy link

github-actions bot commented Dec 7, 2023

🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute.

💡 If you do not hear back from me please check my status! I will report even if I fail!

@jsinglet
Copy link
Contributor

jsinglet commented Dec 7, 2023

🏁 Beep Boop! Performance testing complete! See below for performance of the last 3 runs vs your PR. Times are based on predicate performance. You can find full graphs and stats in the PR that was created for this test in the release engineering repo.


Release                            : v2.22.0
Platform                           : x86-linux
Language                           : c
Total_Serialized_Execution_Time_Ms : 2943450
Mean_Predicate_Execution_Time_Ms   : 76.48900784782495
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 858.1506379688128
Total_Serialized_Execution_Time_s  : 2943.45
Mean_Query_Execution_Time_s        : 0.0764890078478249
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 186.0
Number_of_Predicates               : 38482

Release                            : v2.22.0
Platform                           : x86-linux
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 3073055
Mean_Predicate_Execution_Time_Ms   : 70.29106338205357
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 920.2592911681716
Total_Serialized_Execution_Time_s  : 3073.055
Mean_Query_Execution_Time_s        : 0.0702910633820535
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 177.0
Number_of_Predicates               : 43719

Release                            : v2.22.0
Platform                           : x86-windows
Language                           : c
Total_Serialized_Execution_Time_Ms : 3357788
Mean_Predicate_Execution_Time_Ms   : 86.68167385187289
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 960.7195412073756
Total_Serialized_Execution_Time_s  : 3357.788
Mean_Query_Execution_Time_s        : 0.0866816738518728
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 210.1999999999971
Number_of_Predicates               : 38737

Release                            : v2.22.0
Platform                           : x86-windows
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 3461869
Mean_Predicate_Execution_Time_Ms   : 79.50095303708807
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1043.3963535634423
Total_Serialized_Execution_Time_s  : 3461.869
Mean_Query_Execution_Time_s        : 0.079500953037088
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 200.79999999999563
Number_of_Predicates               : 43545

Release                            : v2.23.0
Platform                           : x86-windows
Language                           : c
Total_Serialized_Execution_Time_Ms : 3297678
Mean_Predicate_Execution_Time_Ms   : 85.7809744296751
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 1342.7743390835178
Total_Serialized_Execution_Time_s  : 3297.678
Mean_Query_Execution_Time_s        : 0.0857809744296751
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 201.0
Number_of_Predicates               : 38443

Release                            : v2.23.0
Platform                           : x86-linux
Language                           : c
Total_Serialized_Execution_Time_Ms : 2948398
Mean_Predicate_Execution_Time_Ms   : 76.63949468430766
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 1297.9149849932878
Total_Serialized_Execution_Time_s  : 2948.398
Mean_Query_Execution_Time_s        : 0.0766394946843076
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 178.0
Number_of_Predicates               : 38471

Release                            : v2.23.0
Platform                           : x86-linux
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 2957492
Mean_Predicate_Execution_Time_Ms   : 70.03627924599792
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 935.7631280328526
Total_Serialized_Execution_Time_s  : 2957.492
Mean_Query_Execution_Time_s        : 0.0700362792459979
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 181.0
Number_of_Predicates               : 42228

Release                            : v2.23.0
Platform                           : x86-windows
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 3330631
Mean_Predicate_Execution_Time_Ms   : 78.85576627127874
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 1049.360013328543
Total_Serialized_Execution_Time_s  : 3330.631
Mean_Query_Execution_Time_s        : 0.0788557662712787
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 202.0
Number_of_Predicates               : 42237

Release                            : 468
Platform                           : x86-linux
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 2757890
Mean_Predicate_Execution_Time_Ms   : 65.36058774736343
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 819.7766805414473
Total_Serialized_Execution_Time_s  : 2757.89
Mean_Query_Execution_Time_s        : 0.0653605877473634
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 179.0
Number_of_Predicates               : 42195

Release                            : 468
Platform                           : x86-linux
Language                           : c
Total_Serialized_Execution_Time_Ms : 2745961
Mean_Predicate_Execution_Time_Ms   : 72.38404154365247
Median_Predicate_Execution_Time_Ms : 1.0
Standard_Deviation_Ms              : 1324.1322438014645
Total_Serialized_Execution_Time_s  : 2745.961
Mean_Query_Execution_Time_s        : 0.0723840415436524
Median_Predicate_Execution_Time_s  : 0.001
Percentile95_Ms                    : 180.0
Number_of_Predicates               : 37936


🏁 Below are the slowest predicates for the last 2 releases vs this PR.


Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : _DataFlowImpl1#bece54ca::hasFlowPath#3#fff_Deviations#ac004ef9::DeviationRecord::getACodeIdentifierC__#antijoin_rhs
Execution_Time_Ms : 29082

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : c
Suite             : cert-default
Predicate         : _#Element#496c7fc2::Element::getEnclosingElement#0#dispredPlus#bf_Access#8878f617::Access::getTarget__#antijoin_rhs
Execution_Time_Ms : 196810

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : #select#ffffffff
Execution_Time_Ms : 45733

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : m##DataFlowUtil#7572fbec::localFlowStep#2Plus#bf
Execution_Time_Ms : 94993

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : Dependency#b0c9183e::dependsOnTransitive#2#ff
Execution_Time_Ms : 142036

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : cpp
Suite             : cert-default
Predicate         : _@element#f_DataFlowUtil#7572fbec::TExprNode#ff_Deviations#ac004ef9::DeviationRecord::getACodeIdenti__#antijoin_rhs
Execution_Time_Ms : 27078

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : DoNotSubtractPointersAddressingDifferentArrays#e86f6fc0::problems#8#ffffffff
Execution_Time_Ms : 47905

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : c
Suite             : cert-default
Predicate         : DoNotSubtractPointersAddressingDifferentArrays#e86f6fc0::problems#8#ffffffff
Execution_Time_Ms : 51173

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#123#fff
Execution_Time_Ms : 74583

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : c
Suite             : cert-default
Predicate         : _#Element#496c7fc2::Element::getEnclosingElement#0#dispredPlus#bf_Access#8878f617::Access::getTarget__#antijoin_rhs
Execution_Time_Ms : 194322

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : _@element#f_Declarations1#f6cea675::Declarations1Package::externalIdentifiersNotDistinctQuery#0#f_De__#antijoin_rhs
Execution_Time_Ms : 42078

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : _@element#f_DataFlowUtil#7572fbec::TExprNode#ff_Deviations#ac004ef9::DeviationRecord::getACodeIdenti__#antijoin_rhs
Execution_Time_Ms : 31194

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : #select#ffffffff
Execution_Time_Ms : 42307

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : m##DataFlowUtil#7572fbec::localFlowStep#2Plus#bf
Execution_Time_Ms : 91293

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : Dependency#b0c9183e::dependsOnTransitive#2#ff
Execution_Time_Ms : 120498

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : c
Suite             : cert-default
Predicate         : _@element#f_Declarations2#dda34f37::Declarations2Package::excessLengthNamesIdentifiersNotDistinctQue__#antijoin_rhs
Execution_Time_Ms : 40946

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : DoNotSubtractPointersAddressingDifferentArrays#e86f6fc0::problems#8#ffffffff
Execution_Time_Ms : 44362

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : c
Suite             : cert-default
Predicate         : DoNotSubtractPointersAddressingDifferentArrays#e86f6fc0::problems#8#ffffffff
Execution_Time_Ms : 48138

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#123#fff
Execution_Time_Ms : 69001

Release           : v2.23.0
Run               : 2023-10-12_15-21-31
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : _@element#f_DataFlowUtil#7572fbec::TExprNode#ff_Deviations#ac004ef9::DeviationRecord::getACodeIdenti__#antijoin_rhs
Execution_Time_Ms : 29307

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#123#fff
Execution_Time_Ms : 67390

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameIndexInternal#4#ffff_3012#join_rhs
Execution_Time_Ms : 37326

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : _@element#f_Declarations5#fba18028::Declarations5Package::identifiersDeclaredInTheSameScopeNotDistin__#antijoin_rhs
Execution_Time_Ms : 33984

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : _@element#f_Declarations1#f6cea675::Declarations1Package::externalIdentifiersNotDistinctQuery#0#f_De__#antijoin_rhs
Execution_Time_Ms : 33602

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : _@element#f_DataFlowUtil#7572fbec::TExprNode#ff_Deviations#ac004ef9::DeviationRecord::getACodeIdenti__#antijoin_rhs
Execution_Time_Ms : 26784

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : m##DataFlowUtil#7572fbec::localFlowStep#2Plus#bf
Execution_Time_Ms : 80982

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : cpp
Suite             : cert-default
Predicate         : _@element#f_DataFlowUtil#7572fbec::TExprNode#ff_Deviations#ac004ef9::DeviationRecord::getACodeIdenti__#antijoin_rhs
Execution_Time_Ms : 27363

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : _@element#f_DataFlowUtil#7572fbec::TExprNode#ff_Deviations#ac004ef9::DeviationRecord::getACodeIdenti__#antijoin_rhs
Execution_Time_Ms : 25725

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : Dependency#b0c9183e::dependsOnTransitive#2#ff
Execution_Time_Ms : 109478

Release           : 468
Run               : 2023-12-07_14-58-53
Platform          : x86-linux
Language          : c
Suite             : cert-default
Predicate         : _#Element#496c7fc2::Element::getEnclosingElement#0#dispredPlus#bf_Access#8878f617::Access::getTarget__#antijoin_rhs
Execution_Time_Ms : 219591


@lcartey
Copy link
Collaborator

lcartey commented Dec 8, 2023

/test-matrix

Copy link

github-actions bot commented Dec 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! qcc/cpp/AARCH64LE Matrix Testing for this PR won't happen because it is outside of license window!

@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! qcc/c/AARCH64LE Matrix Testing for this PR won't happen because it is outside of license window!

@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! clang/cpp/X86_64 Matrix Testing for this PR has been completed. See below for the results!


SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : A18-1-4
QUERY                : PointerToAnElementOfAnArrayPassedToASmartPointer
PACKAGE              : Pointers
TEST_DIFFERENCE      : 

SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : A5-0-4
QUERY                : PointerArithmeticUsedWithPointersToNonFinalClasses
PACKAGE              : Pointers
TEST_DIFFERENCE      : 

SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : A5-1-7
QUERY                : LambdaPassedToDecltype
PACKAGE              : Lambdas
TEST_DIFFERENCE      : 

SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : A5-1-7
QUERY                : LambdaPassedToTypeid
PACKAGE              : Lambdas
TEST_DIFFERENCE      : 

SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : CTR56-CPP
QUERY                : DoNotUsePointerArithmeticOnPolymorphicObjects
PACKAGE              : Pointers
TEST_DIFFERENCE      : 

SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : EXP51-CPP
QUERY                : DoNotDeleteAnArrayThroughAPointerOfTheIncorrectType
PACKAGE              : Freed
TEST_DIFFERENCE      : 

SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : MEM52-CPP
QUERY                : DetectAndHandleMemoryAllocationErrors
PACKAGE              : Allocations
TEST_DIFFERENCE      : 

SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : MEM53-CPP
QUERY                : MissingConstructorCallForManuallyManagedObject
PACKAGE              : Allocations
TEST_DIFFERENCE      : 

SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : MEM53-CPP
QUERY                : MissingDestructorCallForManuallyManagedObject
PACKAGE              : Allocations
TEST_DIFFERENCE      : 

SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : M5-0-17
QUERY                : PointerSubtractionOnDifferentArrays
PACKAGE              : Pointers
TEST_DIFFERENCE      : 

SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : M5-0-18
QUERY                : AppliedToObjectsOfPointerType
PACKAGE              : Pointers
TEST_DIFFERENCE      : 

SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : MEM56-CPP
QUERY                : OwnedPointerValueStoredInUnrelatedSmartPointerCert
PACKAGE              : SmartPointers2
TEST_DIFFERENCE      : 

SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_PASS            : True
COMPILE_PASS         : True
RULE                 : A20-8-1
QUERY                : OwnedPointerValueStoredInUnrelatedSmartPointerAsar
PACKAGE              : SmartPointers1
TEST_DIFFERENCE      : 


@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! gcc/cpp/X86_64 Matrix Testing for this PR has been completed. See below for the results!


PACKAGE              : Pointers
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : PointerToAnElementOfAnArrayPassedToASmartPointer
RULE                 : A18-1-4

PACKAGE              : Pointers
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : PointerArithmeticUsedWithPointersToNonFinalClasses
RULE                 : A5-0-4

PACKAGE              : Lambdas
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : LambdaPassedToDecltype
RULE                 : A5-1-7

PACKAGE              : Lambdas
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : LambdaPassedToTypeid
RULE                 : A5-1-7

PACKAGE              : Pointers
SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : DoNotUsePointerArithmeticOnPolymorphicObjects
RULE                 : CTR56-CPP

PACKAGE              : Freed
SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : DoNotDeleteAnArrayThroughAPointerOfTheIncorrectType
RULE                 : EXP51-CPP

PACKAGE              : Allocations
SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : DetectAndHandleMemoryAllocationErrors
RULE                 : MEM52-CPP

PACKAGE              : Allocations
SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : MissingConstructorCallForManuallyManagedObject
RULE                 : MEM53-CPP

PACKAGE              : Allocations
SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : MissingDestructorCallForManuallyManagedObject
RULE                 : MEM53-CPP

PACKAGE              : Pointers
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : PointerSubtractionOnDifferentArrays
RULE                 : M5-0-17

PACKAGE              : Pointers
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : AppliedToObjectsOfPointerType
RULE                 : M5-0-18

PACKAGE              : SmartPointers2
SUITE                : CERT-C++
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : OwnedPointerValueStoredInUnrelatedSmartPointerCert
RULE                 : MEM56-CPP

PACKAGE              : SmartPointers1
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
TEST_PASS            : True
TEST_DIFFERENCE      : 
QUERY                : OwnedPointerValueStoredInUnrelatedSmartPointerAsar
RULE                 : A20-8-1


@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! clang/c/X86_64 Matrix Testing for this PR has been completed. See below for the results!


COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotUsePointerArithmeticOnNonArrayObjectPointers
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : ARR37-C
TEST_DIFFERENCE      : 
PACKAGE              : InvalidMemory2

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotAddOrSubtractAScaledIntegerToAPointer
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : ARR39-C
TEST_DIFFERENCE      : 
PACKAGE              : Pointers2

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : CleanUpThreadSpecificStorage
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : CON30-C
TEST_DIFFERENCE      : 
PACKAGE              : Concurrency4

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotCastPointerToMoreStrictlyAlignedPointerType
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP36-C
TEST_DIFFERENCE      : 
PACKAGE              : Pointers3

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotCallFunctionPointerWithIncompatibleType
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP37-C
TEST_DIFFERENCE      : 
PACKAGE              : Expressions

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotCallFunctionsWithIncompatibleArguments
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP37-C
TEST_DIFFERENCE      : 
PACKAGE              : Expressions

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : CallPOSIXOpenWithCorrectArgumentCount
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP37-C
TEST_DIFFERENCE      : 
PACKAGE              : Expressions

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotAccessVariableViaPointerOfIncompatibleType
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP39-C
TEST_DIFFERENCE      : 
PACKAGE              : Pointers3

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotModifyConstantObjects
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP40-C
TEST_DIFFERENCE      : 
PACKAGE              : Contracts6

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotPassAliasedPointerToRestrictQualifiedParam
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP43-C
TEST_DIFFERENCE      : 
PACKAGE              : Pointers3

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : RestrictPointerReferencesOverlappingObject
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : EXP43-C
TEST_DIFFERENCE      : 
PACKAGE              : Pointers3

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : OnlyUseValuesForFsetposThatAreReturnedFromFgetpos
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : FIO44-C
TEST_DIFFERENCE      : 
PACKAGE              : IO2

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotModifyAlignmentOfMemoryWithRealloc
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : MEM36-C
TEST_DIFFERENCE      : 
PACKAGE              : Memory2

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotPassInvalidDataToTheAsctimeFunction
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : MSC33-C
TEST_DIFFERENCE      : 
PACKAGE              : Contracts7

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotCallVaArgOnAVaListThatHasAnIndeterminateValue
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : MSC39-C
TEST_DIFFERENCE      : 
PACKAGE              : Contracts7

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotAttemptToModifyStringLiterals
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : STR30-C
TEST_DIFFERENCE      : 
PACKAGE              : Strings1

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : SubtractionBetweenPointersMustAddressSameArray
SUITE                : MISRA-C-2012
TEST_PASS            : True
RULE                 : RULE-18-2
TEST_DIFFERENCE      : 
PACKAGE              : Pointers1

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotSubtractPointersThatDoNotReferToTheSameArray
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : ARR36-C
TEST_DIFFERENCE      : 
PACKAGE              : Memory2

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : DoNotRelatePointersThatDoNotReferToTheSameArray
SUITE                : CERT-C
TEST_PASS            : True
RULE                 : ARR36-C
TEST_DIFFERENCE      : 
PACKAGE              : Memory2

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : RelationalOperatorComparesPointerToDifferentArray
SUITE                : MISRA-C-2012
TEST_PASS            : True
RULE                 : RULE-18-3
TEST_DIFFERENCE      : 
PACKAGE              : Pointers1

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : ArrayFunctionArgumentNumberOfElements
SUITE                : MISRA-C-2012
TEST_PASS            : True
RULE                 : RULE-17-5
TEST_DIFFERENCE      : 
PACKAGE              : Contracts6

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : MemcmpUsedToCompareNullTerminatedStrings
SUITE                : MISRA-C-2012
TEST_PASS            : True
RULE                 : RULE-21-14
TEST_DIFFERENCE      : 
PACKAGE              : EssentialTypes

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : AttemptToWriteToAReadOnlyStream
SUITE                : MISRA-C-2012
TEST_PASS            : True
RULE                 : RULE-22-4
TEST_DIFFERENCE      : 
PACKAGE              : IO3

COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : EofShallBeComparedWithUnmodifiedReturnValues
SUITE                : MISRA-C-2012
TEST_PASS            : True
RULE                 : RULE-22-7
TEST_DIFFERENCE      : 
PACKAGE              : IO3


@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! gcc/c/X86_64 Matrix Testing for this PR has been completed. See below for the results!


SUITE                : CERT-C
PACKAGE              : InvalidMemory2
RULE                 : ARR37-C
TEST_DIFFERENCE      : 
QUERY                : DoNotUsePointerArithmeticOnNonArrayObjectPointers
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Pointers2
RULE                 : ARR39-C
TEST_DIFFERENCE      : 
QUERY                : DoNotAddOrSubtractAScaledIntegerToAPointer
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Concurrency4
RULE                 : CON30-C
TEST_DIFFERENCE      : 
QUERY                : CleanUpThreadSpecificStorage
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Pointers3
RULE                 : EXP36-C
TEST_DIFFERENCE      : 
QUERY                : DoNotCastPointerToMoreStrictlyAlignedPointerType
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Expressions
RULE                 : EXP37-C
TEST_DIFFERENCE      : 
QUERY                : DoNotCallFunctionPointerWithIncompatibleType
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Expressions
RULE                 : EXP37-C
TEST_DIFFERENCE      : 
QUERY                : DoNotCallFunctionsWithIncompatibleArguments
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Expressions
RULE                 : EXP37-C
TEST_DIFFERENCE      : 
QUERY                : CallPOSIXOpenWithCorrectArgumentCount
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Pointers3
RULE                 : EXP39-C
TEST_DIFFERENCE      : 
QUERY                : DoNotAccessVariableViaPointerOfIncompatibleType
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Contracts6
RULE                 : EXP40-C
TEST_DIFFERENCE      : 
QUERY                : DoNotModifyConstantObjects
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Pointers3
RULE                 : EXP43-C
TEST_DIFFERENCE      : 
QUERY                : RestrictPointerReferencesOverlappingObject
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Pointers3
RULE                 : EXP43-C
TEST_DIFFERENCE      : 
QUERY                : DoNotPassAliasedPointerToRestrictQualifiedParam
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : IO2
RULE                 : FIO44-C
TEST_DIFFERENCE      : 
QUERY                : OnlyUseValuesForFsetposThatAreReturnedFromFgetpos
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Memory2
RULE                 : MEM36-C
TEST_DIFFERENCE      : 
QUERY                : DoNotModifyAlignmentOfMemoryWithRealloc
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Contracts7
RULE                 : MSC33-C
TEST_DIFFERENCE      : 
QUERY                : DoNotPassInvalidDataToTheAsctimeFunction
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Contracts7
RULE                 : MSC39-C
TEST_DIFFERENCE      : 
QUERY                : DoNotCallVaArgOnAVaListThatHasAnIndeterminateValue
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Strings1
RULE                 : STR30-C
TEST_DIFFERENCE      : 
QUERY                : DoNotAttemptToModifyStringLiterals
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : MISRA-C-2012
PACKAGE              : Pointers1
RULE                 : RULE-18-2
TEST_DIFFERENCE      : 
QUERY                : SubtractionBetweenPointersMustAddressSameArray
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Memory2
RULE                 : ARR36-C
TEST_DIFFERENCE      : 
QUERY                : DoNotSubtractPointersThatDoNotReferToTheSameArray
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : CERT-C
PACKAGE              : Memory2
RULE                 : ARR36-C
TEST_DIFFERENCE      : 
QUERY                : DoNotRelatePointersThatDoNotReferToTheSameArray
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : MISRA-C-2012
PACKAGE              : Pointers1
RULE                 : RULE-18-3
TEST_DIFFERENCE      : 
QUERY                : RelationalOperatorComparesPointerToDifferentArray
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : MISRA-C-2012
PACKAGE              : Contracts6
RULE                 : RULE-17-5
TEST_DIFFERENCE      : 
QUERY                : ArrayFunctionArgumentNumberOfElements
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : MISRA-C-2012
PACKAGE              : EssentialTypes
RULE                 : RULE-21-14
TEST_DIFFERENCE      : 
QUERY                : MemcmpUsedToCompareNullTerminatedStrings
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : MISRA-C-2012
PACKAGE              : IO3
RULE                 : RULE-22-4
TEST_DIFFERENCE      : 
QUERY                : AttemptToWriteToAReadOnlyStream
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 

SUITE                : MISRA-C-2012
PACKAGE              : IO3
RULE                 : RULE-22-7
TEST_DIFFERENCE      : 
QUERY                : EofShallBeComparedWithUnmodifiedReturnValues
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 


@jsinglet
Copy link
Contributor

jsinglet commented Dec 8, 2023

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

Copy link
Collaborator

@lcartey lcartey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this!

I believe the main user-facing impact for this change is the addition of intermediate nodes in path results where those nodes were specified as additional flow edges (see github/codeql#13717). Reviewing the test changes, I think this should be an improvement overall.

No significant performance changes identified, and no observed compiler compatibility issues in the changed queries. We may still see some compiler compatibility issues based on changes to shared libraries, but these can be addressed as part of the wider group of compiler compatibility issues.

@lcartey lcartey added this pull request to the merge queue Dec 8, 2023
Merged via the queue into github:main with commit 1658a17 Dec 8, 2023
21 checks passed
@jketema jketema deleted the config-update branch December 8, 2023 11:13
@jketema jketema mentioned this pull request Dec 11, 2023
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants