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

PhASAR Release 2403 #704

Merged
merged 60 commits into from
Mar 2, 2024
Merged

PhASAR Release 2403 #704

merged 60 commits into from
Mar 2, 2024

Conversation

fabianbs96
Copy link
Member

No description provided.

fabianbs96 and others added 30 commits April 20, 2023 10:44
* Change solver-config default to not implicitly record the ESG edges anymore

* Allow moving the SolverResults out of the IDESolver

* Move some more results code from IDESolver to SolverResults
* Make the ModuleSlotTracker ref-counted

* minor
* Fix some bugs

* Add utils to LLVMIRToSrc

* Make the Container type parameter of the flow function templates actually settable

* Fix recursive template instantiation in C++20 mode

* feat: boolean to toggle trim

---------

Co-authored-by: Sriteja Kummita <[email protected]>
* Fix resultsAtInLLVMSSA in case the statement is an invoke inst

* minor

* small fix

* Assert overapproximation (optionally)

* minor
* Fix fromMetaDataId + add deserialization support for LLVMBasedICFG

* pre-commit

* Remove out-commented code
* Start adding explicit call graph

* Integrate CallGraph into LLVMBasedICFG

* Add CallGraph interface and integrate it into the ICFG

* Allow constructing LLVMBasedICFG with already given CallGraph

* pre-compile Callgraph with LLVM config

* Fix deserialization

* some cleanup of LLVMBasedICFG

* Make dot printing part of the call graph
* Add consolidated header files

* Add build rules for building a fat lib

* Some docs

* Follow new practices in myphasartool

* Update docs

* minor in docs + pre-commit

* Changes according to review

* Add CG to ControlFlow.h

---------

Co-authored-by: Martin Mory <[email protected]>
* Fix some bugs

* Add utils to LLVMIRToSrc

* Make the Container type parameter of the flow function templates actually settable

* Fix recursive template instantiation in C++20 mode

* feat: boolean to toggle trim

* Fix fromMetaDataId + add deserialization support for LLVMBasedICFG

* pre-commit

* IRDB ctor with pre-loaded IR

* Add chrono utils for formatting std::chrono::duration

* Real constness within SolverResults

* Improve Table + minor

* Fix crash in LCA

* minor

* Make myphasartool link properly with BUILD_SHARED_LIBS

---------

Co-authored-by: Sriteja Kummita <[email protected]>
* Initialize IFDS edge values with bottom to ensure they are propagated in IDE Phase II

* Add FIXME
* Bump json + json-schema-validator

* bump gtest

---------

Co-authored-by: Fabian Schiebel <[email protected]>
Co-authored-by: Fabian Schiebel <[email protected]>
* Add worklist for Phase I in IDESolver

* Add worklist for Phase II in IDESolver

* Remove out-commented recursive calls in IDESolver

* Remove unused variable

---------
* Add worklist for Phase I in IDESolver

* Add worklist for Phase II in IDESolver

* Remove out-commented recursive calls in IDESolver

* Add IDE solving kind that allows interrupting the analysis or injecting code

* Comments + some minor refactoring

* Add unittest

* Generalize the IDESolver mixin + more comments

* Add async cancellation

* Adding continuations

* Make the PAMM tests sleep less

* Add tests for async cancellation and continuing

* Update comments

* Apply review comments
* Header Guards changed to preferred style according to Clang-tidy

* Changed include order to preffered style and set qualified variables to (const) auto according to Clang-tidy

* 'override' functions instead of 'virtual' according to Clang-tidy

* Reverted wrong Header Guard
…#644)

* added descriptions to TaintConfigSchema.json to explain its semantics

* capitalize first letter of descriptions consistently

* Remove parentheses which broke the compilation

---------

Co-authored-by: Martin Mory <[email protected]>
* Move Source/Sink/Sanitizer handling from CTR to Summary FF preventing those functions from being analyzed

* Fix TA summary FF

* Add insertvalue and bitcast handling

* Improve alias-handling in TA

* minor style
* Make NToString and friends free functions

* Remove double parentheses

* Template Typestate Analysis (#654)

* Make IDETypeStateDescription a template to allow for type-safe type states

* Implement JoinLatticeTraits for CSTDFILEIOState

* Move TSA flow functions to source file again

---------

Co-authored-by: Martin Mory <[email protected]>
…led in through phasar (#663)

Co-authored-by: Martin Mory <[email protected]>
Co-authored-by: Fabian Schiebel <[email protected]>
* Add default implementation for allTopFunction()

* Move the default flow function templates to their own class allowing container_type to be deduced (towards specifying sth else than std::set)

* pre-commit TypeTraits.h

* Merge branch 'development' into f-DefaultAllTopFn

---------

Co-authored-by: Martin Mory <[email protected]>
* fix handling of unbalanced returns for IIA, for the change in the IDE solver I am not sure yet how this should be done properly.

* Update include/phasar/PhasarLLVM/DataFlow/IfdsIde/Problems/IDEInstInteractionAnalysis.h

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix error due to update from dev

* Separate APi for side-effets of ret-FF in case of unbalanced-return end

* pre-commit

---------

Co-authored-by: Martin Mory <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Fabian Schiebel <[email protected]>
Co-authored-by: Fabian Schiebel <[email protected]>
szsam and others added 21 commits November 7, 2023 18:52
For `(list)` in bash, `list` is executed in a subshell environment. Variable assignments do not remain in effect after the command completes.

Fix by using `{ list; }`, where `list` is executed in the current shell environment.
* Null checking getCalledFunction() when calling getName()

* minor

* pre-commit

---------

Co-authored-by: SanthoshMohan <[email protected]>
* fix global handling in type state analysis

* Fix error due to update from dev

* fix killing of globals: only kill if no declaration-only func is called

---------

Co-authored-by: Martin Mory <[email protected]>
Co-authored-by: Fabian Schiebel <[email protected]>
…regions should actually be valid (#670)

Co-authored-by: Martin Mory <[email protected]>
* Add split-dwarf to improve linker resource consumption in incremental build

* More target-oriented cmake + verify that llvm small libs exist when not using the fat lib

* Single export set + rename install components

* minor fix

* Auto-detect whether we should link against the fat LLVM lib

* Fix in-tree build

* fix llvm small library search

* make output of non-found small llvm libs pretty

---------

Co-authored-by: Martin Mory <[email protected]>
* Make use of LoggerFilterLevel to conditionally disable message formatting

* Move more from the Logger header to the implementation file

* Refactor StdStream + some cleanup

* Re-enable PIC by default to support ASLR
* Analysis Printer (#17)

* Initial Commit

* AnalysisPrinter Second commit

* Initial Commit

* Integrate Printer with client Analysis and test

* Addressing Review comments

* Integrate AnalysisPrinter with all analyses and template class modified

* vector emplace_back instead of push_back

* Testcase for AnalysisPrinter

* GroundTruth derived class initial commit

* AnalysisPrinter Test complete and Test

* fixing myphasartool file

* Test pre-commit fix

* Adding Test cases and fixing PR failure

* 1.template params to N,D,L  2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* 1.template params to N,D,L 2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* Null AnalysisPrinter singleton

* Adding AnalysisPrinter to IDETabulation Problem

* making free (N,D,L)ToString functions

* disable copy and move for analysis-printer

* Default NullAnalysisPrinter and explicit print methods

* removing SetAnalysisPrinter from client analyses and modified Testcase for AnalysisPrinter

* Adding superclass for AnalysisPrinter

* Addressing review comments and fixing PR build failure

* fix: minors

* fix: minor (clang-tidy)

* fix: review feedback

* misc: minor refactoring

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>

* fix: review feedback

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>
* Add explicit ExplodedSuperGraph and a version of the IDESolver that fills it with content. TODO: Add PathSensitivityManager + unittests

* Add more TODOs

* Add GraphTraits

* Add pathsDagTo (not tested yet)

* Add Z3 submodule

* Set Z3 version

* Add Z3-related stuff (WIP)

* Added now basic functionality for path sensitivity (compiles, but not tested yet)

* Implement LLVMPathConstraints

* Add unittest for PathTracking (C/C++ test files are still missing) and resolve a lot of compilation errors

* Make a lot of the unittests work (still not completed)

* Fix Config propagation

* Finally, fix all unittests

* minor

* redirect z3 submodule

* Checkout the right z3 branch

* bump z3

* add bulk dag-generation (not tested yet)

* Some more fixes

* Add filters to PSM

* Better integrate filter into PSM

* minor

* Improve on reverseDAG

* minor improvements in reverseDAG

* Bump z3

* Fix depdendency issue with utils->config

* Fix bugs indiced by reverse merging from development + bump z3

* Make Z3 optional

* Workaround weird cmake behavior

* Fix seeds in exploded supergraph

* Add forward minimize graph

* Add one Test for forward minimize DAG

* Fix in createEquivalentGraphFrom

* Fix filterOutUnreachableNodes

* Fix: DFAMinimizer edge comparison

* Fix compilation on ubuntu22

* Improve createEquivalentGraphFrom

* Resolve errors due to merging

* Fix z3 dependency

* Fix UAF when copying an ExplicitESG

* Get rid of NodeRef::DSI

* Fix compile error due to merge

* minor

* More const in Table

* Give the PathTracing Filters more power

* Fix null error

* Fix Path Tracing with chaotic edge saving due to new Worklist structure in IDESolver

* Some cleanup

* pre-commit

* Apply some review comments

* Write ESG to temp file instead of hard-coded file

* minor

* pre-commitIDESolver.h

* pre-commit Utilities.h

* trailing whitespace IDESolver.h

* Fix errors due to merge

* Integrate free-functions NToString and DToString into ExplicitESG

* Adapt invariants due to chaotic solving (worklist vs recursion)

* Add LLVMSSA version of pathsDagTo as temporary solution until f-IDESolverStrategy is merged

* minor

* Use system z3

* Find z3 from psr installation

* Assert size overflow

* Enable Z3 in CI

* fix naming issue

---------

Co-authored-by: Fabian Benedikt Schiebel <[email protected]>
Co-authored-by: Sebastian Böhm <[email protected]>
Co-authored-by: Martin Mory <[email protected]>
… explicitly, instead of relying on transitive linkage (#692)
* Add some more statistics

* Even more stats

* Some more counters

* minor

* Make the GSA work again after the merge

* More about globals

* Formatting

* minor
Currently, the custom build of LLVM must be located in
/usr/local/llvm-14.
If not, CMake will either fail finding LLVMConfig.cmake or use a
different LLVM installation, e.g., the system-wide one.
This will, for example, result in an include path different from the
custom LLVM installation.
This commit extends 'bootstrap.sh' to set 'LLVM_ROOT' to the
custom installation. Moreover, it allows the user to select
an arbitrary location for LLVM.

(Fixed #689)

Co-authored-by: Fabian Schiebel <[email protected]>
* Fix InitialSeeds

Join values correctly when reaching a seed location from a different path

* Fix MaybeUniquePtr

---------
* Analysis Printer (#17)

* Initial Commit

* AnalysisPrinter Second commit

* Initial Commit

* Integrate Printer with client Analysis and test

* Addressing Review comments

* Integrate AnalysisPrinter with all analyses and template class modified

* vector emplace_back instead of push_back

* Testcase for AnalysisPrinter

* GroundTruth derived class initial commit

* AnalysisPrinter Test complete and Test

* fixing myphasartool file

* Test pre-commit fix

* Adding Test cases and fixing PR failure

* 1.template params to N,D,L  2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* 1.template params to N,D,L 2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* Null AnalysisPrinter singleton

* Adding AnalysisPrinter to IDETabulation Problem

* making free (N,D,L)ToString functions

* disable copy and move for analysis-printer

* Default NullAnalysisPrinter and explicit print methods

* removing SetAnalysisPrinter from client analyses and modified Testcase for AnalysisPrinter

* Adding superclass for AnalysisPrinter

* Addressing review comments and fixing PR build failure

* fix: minors

* fix: minor (clang-tidy)

* fix: review feedback

* misc: minor refactoring

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>

* OnTheFlyReporting Initial Commit

* fix: review feedback

* onTheFlyAnalysis makeUniquePtr

* OnTheFlyReporting Initial Commit

* onTheFlyAnalysis makeUniquePtr

* addressing minor error in prev commit

* Refactoring Warn Variable and Refactoring lambda flow for AnalysisPrinter

* Integrating sourceMgr to AnalysisPrinter

* Testcase for OnTheFlyAnalysisPrinting

* Testcase for SourceMgrPrinter

* MaybeUniquePtr for SourceMgrPrinter

* Minor review comments

* refactoring the printers

* adding TODOs

* more TODOs

* Refactor AnalysisPrinter part1

* Refactor AnalysisPrinter part2

* dev: update AnalysisPrinterBase, integrate and fix tests

* adding warning kind

* fix ci

* update codeowners for analysis-printer

* Refactor SourceManagerPrinter

* Minor in OTF Printer Test

* fixing review feedback

* fix l_t printing

* Mandating analysisType to tyestate descriptions

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Fabian Schiebel <[email protected]>
* Add some statistics to the edge functions in IDE

* Make more of AnalysisController internal and reduce dependencies

* More stats (WIP)

* EF Stats object

* More EF stats + add some JF stats

* Apply some review comments

* More review fixes

---------

Co-authored-by: Martin Mory <[email protected]>
* Fix the option PHASAR_DEBUG_LIBDEPS to show unresolved functions in libraries

* Silencing some warnings

* Enable DEBUG_LIBDEPS for libphasar as well + don't include PhasarClang if BUILD_PHASAR_CLANG is OFF

* Get rid of "extra semicolon" warning due to empty FRIEND_TEST macro

* minor

* Workaround incompatibility of DEBUG_LIBDEPS and ASAN

* Update checkout version in CI to avoid deprecation warning

* revert the swap

---------

Co-authored-by: Martin Mory <[email protected]>
* Fix joinImpl + IIAAKillOrReplaceEF in IIA

* minor

---------

Co-authored-by: Martin Mory <[email protected]>
* small backup safe

* backup save, still needs metadata extraction

* refactoring + some basic functions implemented

* basic structure of constructHierarchy()

* DIBasedTypeHierarchy structure

* basic impl of constructor and hasVFTable

* impl edges of graph, isSubType, getSubType and print

* untested version of transitive closure

* added transitive closure and changed print

* fixed transitive closure + refactoring

* bug fixes + tests

* debugging Debug info extraction

* Fixed type extraction, untested transitive hull

* fixed includes + more debug info

* bug fixes and non recursive transitive hull

* working direct edge detection

* BitVector, cleanup, start of vtable impl

* vtables and dotgraph

* review changes + vtable fix, 50% finished

* impl review suggestions

* removed old type_hierarchy unittests

* impl .set_bits() loop

* fixed vtables

* fixes and code cleanup

* added llvm::interleaveComma

* fixed wrong assertion

* public LLVMVFTable constructor

* small refactor

* important bugfixes

* unittests for multiple base classes

* unittests not finished, backup

* more unittests, all pass

* reworked unittests

* review changes

* review changes

* myphasartools.cpp revert

* current final version

* Bump submodules

* backup of fixes + unittests

* more unittests

* new unittest

* Pin swift version

* basicRecoTH backup

* backup of structure

* Analysis Printer (#17)

* Initial Commit

* AnalysisPrinter Second commit

* Initial Commit

* Integrate Printer with client Analysis and test

* Addressing Review comments

* Integrate AnalysisPrinter with all analyses and template class modified

* vector emplace_back instead of push_back

* Testcase for AnalysisPrinter

* GroundTruth derived class initial commit

* AnalysisPrinter Test complete and Test

* fixing myphasartool file

* Test pre-commit fix

* Adding Test cases and fixing PR failure

* 1.template params to N,D,L  2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* 1.template params to N,D,L 2.remove AnalysisType param from AnalysisResults 3.rearranging class variables

* Null AnalysisPrinter singleton

* Adding AnalysisPrinter to IDETabulation Problem

* making free (N,D,L)ToString functions

* disable copy and move for analysis-printer

* Default NullAnalysisPrinter and explicit print methods

* removing SetAnalysisPrinter from client analyses and modified Testcase for AnalysisPrinter

* Adding superclass for AnalysisPrinter

* Addressing review comments and fixing PR build failure

* fix: minors

* fix: minor (clang-tidy)

* fix: review feedback

* misc: minor refactoring

---------

Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>

* new unittests, some fail

* unittests fixed, all pass

* Add LLVM-RTTI-style type-hierarchy layout

* fix: review feedback

* Fix logging macro invocation

* Split giant DIBasedTypeHierarchy ctor into multiple functions

---------

Co-authored-by: mxHuber <[email protected]>
Co-authored-by: SanthoshMohan <[email protected]>
Co-authored-by: Sriteja Kummita <[email protected]>
Co-authored-by: Martin Mory <[email protected]>
@MMory MMory merged commit bbf6229 into master Mar 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants