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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
290f455
Consume solver results (#608)
fabianbs96 Apr 20, 2023
7a8b476
The fix (#609)
fabianbs96 Apr 20, 2023
710ef66
Update bootstrap.h to work properly when boost is not already install…
fabianbs96 Apr 20, 2023
88e42a2
Ref-counted ModuleSlotTracker (#614)
fabianbs96 May 4, 2023
0309ccb
Misc fixes (#615)
fabianbs96 May 4, 2023
285f03e
Enable building phasar with C++20 (#618)
fabianbs96 May 12, 2023
d7cb8ea
Fix result[s]AtInLLVMSSA() (#620)
fabianbs96 May 16, 2023
a586558
Deserialization for LLVMBasedICFG (#617)
fabianbs96 May 31, 2023
c3b932c
Explicit Call Graph (#619)
fabianbs96 May 31, 2023
4f568a7
Phasar DynLib and LTO (#621)
fabianbs96 Jun 5, 2023
2b4ec1c
Misc Fixes II (#625)
fabianbs96 Jun 15, 2023
263ef58
Small refactoring of LLVMBasedAliasAnalysis + allow disabling the CFL…
fabianbs96 Jun 15, 2023
57dd51a
Use temp databases in HexastoreTest to avoid IO (#628)
MMory Jun 15, 2023
6d1ef70
Fix InitialSeeds for IFDS (#632)
fabianbs96 Jun 18, 2023
0605f7b
Bump dependencies (#627)
MMory Jun 18, 2023
6ef25f4
Worklist for IDESolver (#630)
fabianbs96 Jun 18, 2023
1386d91
Skip debug instructions in TaintConfig initial seeds (#635)
fabianbs96 Jun 21, 2023
3f6436c
Bump json-schema-validator to fix build on ARM (#636)
fabianbs96 Jun 22, 2023
c6417d9
Lock-step Solving and Timeout for IDE Solver (#638)
fabianbs96 Jun 29, 2023
349656f
F clang tidy compliance (#641)
Poppeldipop Jul 6, 2023
907d01d
added descriptions to TaintConfigSchema.json to explain its semantics…
StamesJames Jul 26, 2023
f1c5865
fix uninitialized pointer that is used for SOO, making valgrind happy…
MMory Jul 31, 2023
49f3310
Fix taint analysis (#648)
fabianbs96 Aug 2, 2023
4a58224
Fix and update PAMM (#655)
fabianbs96 Aug 15, 2023
1b28878
disable the RVO test as it requires a very specific system setup to w…
fabianbs96 Aug 17, 2023
4ac7e69
Make NToString and friends free functions (#652)
fabianbs96 Aug 24, 2023
7340a46
link llvm Demangle component to controller, otherwise build in vara f…
MMory Aug 28, 2023
1d0b6e4
don't link fat LLVM lib in myphasartool, needs to be transitively pul…
MMory Aug 28, 2023
b763b5f
Cleaning up IDETabulationProblem (#653)
fabianbs96 Aug 28, 2023
c78dbe0
Fix handling of unbalanced returns for IIA (#664)
MMory Sep 6, 2023
76fe080
Adds helper function to determine if a function was generated by phas…
vulder Sep 10, 2023
94a0e47
Fix Backward ICFG (#660)
fabianbs96 Sep 21, 2023
1fafc44
Fix Taint Analysis (#661)
fabianbs96 Sep 21, 2023
06da95b
HelperAnalyses with existing Module (#667)
fabianbs96 Sep 21, 2023
82a89f6
Pin swift version (#671)
fabianbs96 Oct 9, 2023
de6d505
TaintConfig Serialization (#672)
fabianbs96 Oct 9, 2023
9eda5e2
Cleanup Build (#673)
fabianbs96 Oct 27, 2023
02e832d
Fix unexpected subshell execution in bootstrap.sh (#678)
szsam Nov 7, 2023
5ddab3f
CallBase Called Function getName Null Check (#680)
fabianbs96 Nov 15, 2023
659cb8d
Fix global handling in type state analysis (#651)
MMory Nov 17, 2023
ae8c161
Use the ASAN API to better communicate to the sanitizer, what memory …
fabianbs96 Nov 19, 2023
4c04ed3
Fix Build (#684)
fabianbs96 Nov 25, 2023
3aca432
Improve Logger Performance (#683)
fabianbs96 Nov 25, 2023
fc14480
Make killAllFlows() kill flows (#682)
fabianbs96 Nov 25, 2023
1e9f3b7
Analysis Printer (#677)
fabianbs96 Nov 25, 2023
b07f56a
Path Tracing (#640)
fabianbs96 Nov 27, 2023
1edd12d
TaintConfigData need include cstdint for uint32_t (#691)
Dec 11, 2023
c3f5591
The LLVMBasedICFGGlobCtorDtorTest needs LLVMLinker, so we better link…
fabianbs96 Dec 12, 2023
385c305
More General Statistics (#686)
fabianbs96 Dec 12, 2023
7f1237b
Provide LLVM's CFL-based alias analyses (#687)
fabianbs96 Dec 12, 2023
61b3a30
Make the old way of configuring phasar work again (#694)
fabianbs96 Dec 12, 2023
7aae84d
Allow LLVM beeing installed in a custom path (#690)
flipreverse Feb 1, 2024
cd302d8
Misc Fixes (#698)
fabianbs96 Feb 1, 2024
8a786ac
Implementing On-The-Fly Reporting (#701)
sritejakv Feb 25, 2024
1d1be21
IDE Statistics (#697)
fabianbs96 Feb 29, 2024
fec44a5
Fix DebugLibDeps (#699)
fabianbs96 Feb 29, 2024
a56fc58
Fix IIA Edge Functions (#700)
fabianbs96 Feb 29, 2024
7f0f756
DI-based LLVM Type Hierarchy (#702)
fabianbs96 Feb 29, 2024
5e007be
Bump v2403 (#703)
fabianbs96 Mar 1, 2024
49ad944
Merge branch 'master' into development
Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Checks: '-*,
misc-*,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
-misc-use-anonymous-namespace,
readability-*,
-readability-function-cognitive-complexity,
-readability-else-after*,
Expand All @@ -25,12 +26,13 @@ Checks: '-*,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-avoid-do-while,
bugprone-*,
-bugprone-easily-swappable-parameters,
modernize-*,
-modernize-use-trailing-return-type,
performance-*,
clang-analyzer-*,
clang-analyzer-*
'

FormatStyle: LLVM
Expand All @@ -55,7 +57,7 @@ CheckOptions:
- key: readability-identifier-naming.ParameterIgnoredRegexp
value: (d|d1|d2|d3|d4|d5|eP|f|n)
- key: readability-identifier-naming.FunctionIgnoredRegexp
value: (try_emplace|from_json|to_json|equal_to|to_string)
value: (try_emplace|from_json|to_json|equal_to|to_string|DToString|NToString|FToString|LToString)
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 1
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ Dockerfile @janniclas
/.docker/ @janniclas

/include/phasar/Utils/Logger.h @MMory
/include/phasar/Utils/AnalysisPrinterBase.h @sritejakv
/include/phasar/Utils/DefaultAnalysisPrinter.h @sritejakv
/include/phasar/Utils/NullAnalysisPrinter.h @sritejakv
/include/phasar/Utils/OnTheFlyAnalysisPrinter.h @sritejakv
/include/phasar/PhasarLLVM/Utils/SourceMgrPrinter.h @sritejakv
/lib/PhasarLLVM/Utils/SourceMgrPrinter.cpp @sritejakv
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''
Replace the empty checkboxes [ ] below with checked ones [x] accordingly. -->

- [ ] I have searched open and closed issues for duplicates
- [ ] I made sure that I am not using an old project version (DO: pull Phasar, update git submodules, rebuild the project and check if the bug is still there)
- [ ] I made sure that I am not using an old project version (DO: pull PhASAR, update git submodules, rebuild the project and check if the bug is still there)

----------------------------------------

Expand All @@ -24,9 +24,9 @@ Describe here the issue that you are experiencing.
- that reproduce the bug
- e.g. cli arguments and flags

**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behaviour)
**Actual result:** Describe here what happens after you run the steps above (i.e. the buggy behavior)

**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)
**Expected result:** Describe here what should happen after you run the steps above (i.e. what would be the correct behavior)

### Context (Environment)

Expand All @@ -35,7 +35,7 @@ Describe here the issue that you are experiencing.
- **phasar:** \[commit-id]
- **googletest:** \[commit-id]
- **json:** \[commit-id]
- **WALi-OpenNWA:** \[commit-id]
- **json-schema-validator** \[commit-id]

<!-- Which operating system are you using? -->

Expand All @@ -48,11 +48,12 @@ Describe here the issue that you are experiencing.

**Build Type:**
- [ ] cmake
- [ ] bootstrap.sh
- [ ] custom build

### Possible solution

We are happy to discuss possible solutions to this problem, especially if it origniates from a design flaw.
We are happy to discuss possible solutions to this problem, especially if it originates from a design flaw.

### Example files

Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,25 @@ jobs:
matrix:
compiler: [ [clang++-14, clang-14] ]
build: [ Debug, Release ]
include:
- build: Debug
flags: -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON
- build: Release
flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON

continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Install Basic Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install --no-install-recommends \
cmake \
ninja-build \
libstdc++6 \
libboost-all-dev

- name: Install Phasar Dependencies
shell: bash
run: |
./utils/InstallAptDependencies.sh
sudo apt-get -y install --no-install-recommends libboost-graph-dev

- name: Install Strategy Dependencies
shell: bash
Expand All @@ -55,19 +51,21 @@ jobs:
libclang-rt-14-dev

- uses: swift-actions/setup-swift@v1
with:
swift-version: "5.8.1"
- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
env:
BUILD_TYPE: ${{ matrix.build }}
CXX: ${{ matrix.compiler[0] }}
CC: ${{ matrix.compiler[1] }}
shell: bash
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_CXX_COMPILER=$CXX \
-DBUILD_SWIFT_TESTS=1 \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DBUILD_SWIFT_TESTS=ON \
-DPHASAR_USE_Z3=ON \
${{ matrix.flags }} \
-G Ninja
cmake --build .

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ bin/*
# build directories for cmake
build/
build_*/
build-*/

# LLVM project
llvm-project/*
Expand Down
34 changes: 20 additions & 14 deletions BreakingChanges.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# Breaking Changes

## v2403

- Versioning scheme has been changed from `<month><year>` to `<year><month>`
- Default build mode is no longer `SHARED` but `STATIC`. To build in shared mode, use the cmake option `BUILD_SHARED_LIBS` which we don't recommend anymore. Consider using `PHASAR_BUILD_DYNLIB` instead to build one big libphasar.so.
- Build type `DebugSan` has been removed in favor of a new CMake option `PHASAR_ENABLE_SANITIZERS` that not only works in `Debug` mode.

## v0323

- `EdgeFunctionPtrType` is no longer a `std::shared_ptr`. Instead `EdgeFunction<l_t>` should be used directly. `EdgeFunction` is now a *value-type* that encapsulates its memory management by itself.
- Concrete `EdgeFunction` types no longer derive from any base-class. Instead they just need to implement the required API functions. `EdgeFunction` implementations should me move-constructible and can be implicitly cast to `EdgeFunction`. To verify that your type implements the edge function interface use the `IsEdgeFunction` type trait. The API functions have been changed as follows:
- All API functions of `EdgeFunction` must be `const` qualified.
- `EdgeFunctionPtrType composeWith(EdgeFunctionPtrType SecondFunction)` and `EdgeFunctionPtrType joinWith(EdgeFunctionPtrType OtherFunction)` have been changed to `static EdgeFunction<l_t> compose(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& SecondFunction)` and `static EdgeFunction<l_t> join(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& OtherFunction)` respectively. Here, the `This` parameter models the former `shared_from_this()`.
- `bool equal_to(EdgeFunctionPtrType Other)const` has been changed to `bool operator==(const T &Other)const noexcept`, where `T` is your concrete edge function type.
- `void print(llvm::raw_ostream &OS, bool IsForDebug)` has been changed to `friend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const T& EF)`.
- All API functions of `EdgeFunction` must be `const` qualified.
- `EdgeFunctionPtrType composeWith(EdgeFunctionPtrType SecondFunction)` and `EdgeFunctionPtrType joinWith(EdgeFunctionPtrType OtherFunction)` have been changed to `static EdgeFunction<l_t> compose(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& SecondFunction)` and `static EdgeFunction<l_t> join(EdgeFunctionRef<T> This, const EdgeFunction<l_t>& OtherFunction)` respectively. Here, the `This` parameter models the former `shared_from_this()`.
- `bool equal_to(EdgeFunctionPtrType Other)const` has been changed to `bool operator==(const T &Other)const noexcept`, where `T` is your concrete edge function type.
- `void print(llvm::raw_ostream &OS, bool IsForDebug)` has been changed to `friend llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const T& EF)`.
- `EdgeFunction` is tagged with `[[clang::trivial_abi]]`. Hence, you should not rely on any destruction order within a top-level statement that uses temporary `EdgeFunction` objects.
- `EdgeFunctionSingletonFactory` has been removed. Use `EdgeFunctionSingletonCache` instead.
- `TaintConfig` has been renamed to `LLVMTaintConfig`. For generic code you may want to use the LLVM-independent `TaintConfigBase` CRTP interface instead.
- Renamed `phasar/PhasarLLVM/DataFlowSolver/` to either `phasar/DataFlow/` or `phasar/PhasarLLVM/DataFlow/` depending on whether the components need LLVMCore. Analoguous changes in `lib/` and `unittests/`.
An incomplete list of moved/renamed files:
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*` => `phasar/DataFlow/IfdsIde/Solver/*`
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h` => `phasar/DataFlow/IfdsIde/IDETabulationProblem.h`
- `phasar/DB/LLVMProjectIRDB.h` => `phasar/PhasarLLVM/DB/LLVMProjectIRDB.h`
- ...
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/*` => `phasar/DataFlow/IfdsIde/Solver/*`
- `phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IDETabulationProblem.h` => `phasar/DataFlow/IfdsIde/IDETabulationProblem.h`
- `phasar/DB/LLVMProjectIRDB.h` => `phasar/PhasarLLVM/DB/LLVMProjectIRDB.h`
- ...
- Renamed and split up some libraries:
- `phasar_phasarllvm_utils` => `phasar_llvm_utils`
- `phasar_typehierarchy` => `phasar_llvm_typehierarchy`
- `phasar_ifdside` => `phasar_llvm_ifdside`
- `phasar_controlflow` has its LLVM dependent stuff moved to `phasar_llvm_controlflow`
- `phasar_db` has its LLVM dependent stuff moved to `phasar_llvm_db`
- `phasar_pointer` has its LLVM dependent stuff moved to `phasar_llvm_pointer`
- `phasar_phasarllvm_utils` => `phasar_llvm_utils`
- `phasar_typehierarchy` => `phasar_llvm_typehierarchy`
- `phasar_ifdside` => `phasar_llvm_ifdside`
- `phasar_controlflow` has its LLVM dependent stuff moved to `phasar_llvm_controlflow`
- `phasar_db` has its LLVM dependent stuff moved to `phasar_llvm_db`
- `phasar_pointer` has its LLVM dependent stuff moved to `phasar_llvm_pointer`
- Renamed the phasar tool `phasar-llvm` to `phasar-cli`
- `LLVMPointsTo[.*]` has been renamed to `LLVMAlias[.*]`
- The ctor of `LLVMAliasSet` now takes the `LLVMProjectIRDB` as pointer instead of a reference to better document that it may capture the IRDB by reference.
Expand Down
Loading
Loading