Skip to content

Commit 8c178ff

Browse files
authored
Merge pull request #758 from secure-software-engineering/development
Release v2503
2 parents bbf6229 + b71fbaa commit 8c178ff

File tree

423 files changed

+18361
-8405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

423 files changed

+18361
-8405
lines changed

.clang-tidy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Checks: '-*,
1717
-readability-convert-member-functions-to-static,
1818
-readability-isolate-declaration,
1919
-readability-identifier-length,
20+
-readability-redundant-member-init,
21+
-readability-use-anyofallof,
2022
cppcoreguidelines-*,
2123
-cppcoreguidelines-avoid-non-const-global-variables,
2224
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
@@ -57,7 +59,7 @@ CheckOptions:
5759
- key: readability-identifier-naming.ParameterIgnoredRegexp
5860
value: (d|d1|d2|d3|d4|d5|eP|f|n)
5961
- key: readability-identifier-naming.FunctionIgnoredRegexp
60-
value: (try_emplace|from_json|to_json|equal_to|to_string|DToString|NToString|FToString|LToString)
62+
value: (try_emplace|from_json|to_json|equal_to|to_string|DToString|NToString|FToString|LToString|hash_value)
6163
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
6264
value: 1
6365
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions

.dockerignore

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
./docker
2-
./build
1+
*
2+
!.git
3+
!cmake/
4+
!config/
5+
!include/
6+
!lib/
7+
!test/
8+
!tools/
9+
!unittests/
10+
!utils/*.sh
11+
!utils/*.py
12+
13+
!.gitmodules
14+
!CMakeLists.txt
15+
!Config.cmake.in
16+
!config.h.in

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ Dockerfile @janniclas
3232
/include/phasar/Utils/OnTheFlyAnalysisPrinter.h @sritejakv
3333
/include/phasar/PhasarLLVM/Utils/SourceMgrPrinter.h @sritejakv
3434
/lib/PhasarLLVM/Utils/SourceMgrPrinter.cpp @sritejakv
35+
36+
/conanfile.py @jusito
37+
/utils/conan/ @jusito

.github/workflows/ci.yml

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,32 @@ on:
66
pull_request:
77
branches: [ master, development ]
88

9+
# TODO test in tree build?
10+
# TODO test conan build
911
jobs:
1012
build:
11-
runs-on: ubuntu-20.04
13+
runs-on: ${{ matrix.os }}
1214
strategy:
1315
fail-fast: true
1416
matrix:
15-
compiler: [ [clang++-14, clang-14] ]
16-
build: [ Debug, Release ]
17+
os: [ubuntu-20.04, ubuntu-24.04-arm]
18+
compiler: [ [clang++-19, clang-19, "clang-19 libclang-rt-19-dev"] ]
19+
build: [ Debug, Release, DebugLibdeps ]
1720
include:
1821
- build: Debug
19-
flags: -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON
22+
cmake_build_type: Debug
23+
flags: -DPHASAR_ENABLE_SANITIZERS=ON
2024
- build: Release
21-
flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON
25+
cmake_build_type: Release
26+
flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON
27+
- build: DebugLibdeps
28+
cmake_build_type: Debug
29+
flags: -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON
30+
exclude:
31+
- os: ubuntu-24.04-arm
32+
build: Debug
33+
- os: ubuntu-24.04-arm
34+
build: DebugLibdeps
2235

2336
continue-on-error: false
2437
steps:
@@ -31,43 +44,42 @@ jobs:
3144
- name: Install Phasar Dependencies
3245
shell: bash
3346
run: |
34-
./utils/InstallAptDependencies.sh
35-
sudo apt-get -y install --no-install-recommends libboost-graph-dev
47+
./utils/InstallAptDependencies.sh --noninteractive tzdata ${{ matrix.compiler[2] }}
3648
37-
- name: Install Strategy Dependencies
49+
- uses: swift-actions/setup-swift@v2
50+
if: matrix.os == 'ubuntu-20.04'
51+
with:
52+
swift-version: "5.8.1"
53+
- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }} including swift
54+
if: matrix.os == 'ubuntu-20.04'
55+
env:
56+
CXX: ${{ matrix.compiler[0] }}
57+
CC: ${{ matrix.compiler[1] }}
3858
shell: bash
3959
run: |
40-
sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
41-
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main'
42-
sudo apt-get update
43-
sudo apt-get -y install --no-install-recommends \
44-
${{ matrix.compiler[1] }} \
45-
llvm-14-dev \
46-
libllvm14 \
47-
libclang-common-14-dev \
48-
libclang-14-dev \
49-
libclang-cpp14-dev \
50-
clang-tidy-14 \
51-
libclang-rt-14-dev
60+
cmake -S . -B build \
61+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
62+
-DBUILD_PHASAR_CLANG=OFF \
63+
-DBUILD_SWIFT_TESTS=ON \
64+
-DPHASAR_USE_Z3=ON \
65+
${{ matrix.flags }} \
66+
-G Ninja
67+
ninja -C build
5268
53-
- uses: swift-actions/setup-swift@v1
54-
with:
55-
swift-version: "5.8.1"
5669
- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
70+
if: matrix.os != 'ubuntu-20.04'
5771
env:
5872
CXX: ${{ matrix.compiler[0] }}
5973
CC: ${{ matrix.compiler[1] }}
6074
shell: bash
6175
run: |
62-
mkdir build
63-
cd build
64-
cmake .. \
65-
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
66-
-DBUILD_SWIFT_TESTS=ON \
76+
cmake -S . -B build \
77+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
78+
-DBUILD_PHASAR_CLANG=OFF \
6779
-DPHASAR_USE_Z3=ON \
6880
${{ matrix.flags }} \
6981
-G Ninja
70-
cmake --build .
82+
ninja -C build
7183
7284
- name: Run Unittests
7385
shell: bash

.github/workflows/docker.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,40 @@ name: Docker Image
22

33
on:
44
push:
5-
branches: [ development ]
5+
branches: [ master, development ]
6+
pull_request:
7+
branches: [ master, development ]
68

79
jobs:
810
push_to_registries:
911
name: Push Docker image to multiple registries
10-
runs-on: ubuntu-latest
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-24.04, ubuntu-24.04-arm]
1116
permissions:
1217
packages: write
1318
contents: read
1419
steps:
1520
- name: Check out the repo
16-
uses: actions/checkout@v3
17-
- name: Set up QEMU
18-
uses: docker/setup-qemu-action@v2
21+
uses: actions/checkout@v4
1922
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@v2
21-
# If we want to publish an image of PhASAR to the official docker hub we
22-
# can just use the following code and set the corresponding secrets.
23-
# - name: Log in to Docker Hub
24-
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
25-
# with:
26-
# username: ${{ secrets.DOCKER_USERNAME }}
27-
# password: ${{ secrets.DOCKER_TOKEN }}
28-
23+
uses: docker/setup-buildx-action@v3
2924
- name: Log in to the Container registry
30-
uses: docker/login-action@v2
25+
uses: docker/login-action@v3
3126
with:
3227
registry: ghcr.io
3328
username: ${{ github.actor }}
3429
password: ${{ secrets.GITHUB_TOKEN }}
35-
3630
- name: Extract metadata (tags, labels) for Docker
3731
id: meta
3832
uses: docker/metadata-action@v4
3933
with:
4034
images: ghcr.io/${{ github.repository }}
41-
# here we could add a second image for the official docker registry
42-
# sse/phasar
4335
- name: Build and push Docker images
44-
uses: docker/build-push-action@v3
36+
uses: docker/build-push-action@v6
4537
with:
4638
context: .
47-
platforms: linux/amd64,linux/arm64
48-
push: true
39+
push: ${{ github.ref == 'refs/heads/development' }}
4940
tags: ${{ steps.meta.outputs.tags }}
5041
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
bin/*
55

66
# build directories for cmake
7-
build/
8-
build_*/
9-
build-*/
7+
build*/
8+
cmake-build*/
9+
cmake-install*/
10+
CMakeUserPresets.json
11+
venv/
1012

1113
# LLVM project
1214
llvm-project/*
@@ -26,6 +28,7 @@ doc/*
2628

2729
# log/ directory
2830
log/*
31+
**/*/logs/
2932

3033
# CMake build dir
3134
build/*
@@ -43,12 +46,15 @@ build/*
4346
.idea/*
4447

4548
# cache
46-
.cache/*
49+
.cache/
4750

4851
##### ignored files
4952

5053
# ignore all auto-generated LLVM IR code
5154
*.ll
55+
!utils/conan/llvm-core/all/test_package/test_function.ll
56+
!test_package/example.ll
57+
!test_package_cmake/example.ll
5258

5359
# auto generated test files
5460
*.test

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ repos:
55
rev: v4.3.0
66
hooks:
77
- id: trailing-whitespace
8+
exclude: "^.*\\.patch$"
89
- id: end-of-file-fixer
10+
exclude: "^.*\\.patch$"
911
- id: check-yaml
1012
- id: check-added-large-files
1113
- id: requirements-txt-fixer

BreakingChanges.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Breaking Changes
22

3+
## development HEAD
4+
5+
*None*
6+
7+
## v2503
8+
9+
- The `DTAResolver` and the cli option `--call-graph-analysis=dta` do not work anymore (due to opaque pointers) and will be removed for the next release. Please use the `OTF` or `RTA` resolver instead.
10+
- The default type-hierarchy implementation has been changed from `LLVMTypeHierarchy` to `DIBasedTypeHierarchy`. This also requires all affected analyses to be performed on LLVM IR that contains debug information.
11+
- Removed the phasar-library `phasar_controller`. It is now part of the tool `phasar-cli`.
12+
- The API of the `TypeHierarchy` interface (and thus the `LLVMTypeHierarchy` and `DIBasedTypeHierarchy` as well) has changed:
13+
- No handling of the super-type relation (only sub-types)
14+
- No VTable handling anymore -- has been out-sourced into `LLVMVFTableProvider`
15+
- minor API changes
16+
- The constructors of the call-graph resolvers have changed. They:
17+
- take the `LLVMProjectIRDB` as pointer-to-const
18+
- take an additional second parameter of type `const LLVMVFTableProvider *`
19+
- not necessarily require a `LLVMTypeHierarchy` anymore
20+
- Some constructors of `LLVMBasedICFG` do not accept a `LLVMTypeHierarchy` pointer anymore
21+
- Removed IfdsFieldSensTaintAnalysis as it relies on LLVM's deprecated typed-pointers.
22+
323
## v2403
424

525
- Versioning scheme has been changed from `<month><year>` to `<year><month>`

0 commit comments

Comments
 (0)