Skip to content

Commit 5af4fcc

Browse files
committed
ci/msys2: add build with -ftrivial-auto-var-init
Just to catch uninitialized variables early. Build all three unint/zero/pattern to compare the results between them and we don't accidentally depend on implicit initialization in tests.
1 parent 636cf7d commit 5af4fcc

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,16 @@ jobs:
572572
include:
573573
- sys: "clang64"
574574
os: "windows-latest"
575+
auto-var-init: "uninitialized"
575576
- sys: "clang64"
576577
os: "windows-latest"
577578
asan: true
579+
- sys: "clang64"
580+
os: "windows-latest"
581+
auto-var-init: "zero"
582+
- sys: "clang64"
583+
os: "windows-latest"
584+
auto-var-init: "pattern"
578585
- sys: "mingw64"
579586
os: "windows-latest"
580587
- sys: "ucrt64"
@@ -631,6 +638,7 @@ jobs:
631638
env:
632639
SYS: ${{ matrix.sys }}
633640
ASAN: ${{ matrix.asan }}
641+
AUTO_VAR_INIT: ${{ matrix.auto-var-init }}
634642

635643
- name: Print meson log
636644
if: ${{ failure() && steps.build.outcome == 'failure' }}

ci/build-msys2.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ if [[ -n "$ASAN" ]]; then
1414
)
1515
fi
1616

17+
if [[ -n "$AUTO_VAR_INIT" ]]; then
18+
args+=(
19+
-Dc_args="-ftrivial-auto-var-init=$AUTO_VAR_INIT"
20+
-Dcpp_args="-ftrivial-auto-var-init=$AUTO_VAR_INIT"
21+
)
22+
fi
23+
1724
echo "::group::Building subrandr"
1825
build_subrandr "/$SYS"
1926
echo "::endgroup::"

0 commit comments

Comments
 (0)