Commit 635ed66
build: update and shrink build images, migrate to clang 19 (#3771)
* build: migrate clang 17 -> 19
This matches Rust 1.84, but libdatadog recently introduced a flag
which was introduced in this version. Although this should not cause
a hard failure and libdatadog should be patched, it's also a good
idea to upgrade.
* ci: avoid interactive mode for docker login
* ci: -u must come before --pasword-stdin
* build: drop LLVM components that need python, drop protobuf
* build: shrink centos-7 base image by ~2.4 GB
- Exclude kernel-core, kernel-modules, linux-firmware globally via yum.conf
(~183 MB; these are useless in containers)
- Move devtoolset-9 into the LLVM RUN layer and remove it afterward (~196 MB)
- Build LLVM with CLANG_BUILD_TOOLS=OFF and LLVM_INSTALL_TOOLCHAIN_ONLY=ON
to skip building unused tools (~1.3 GB)
- Remove LLVM internal C++ headers and cmake config dirs post-install (~54 MB)
- Add --disable-static to libxml2, libffi, oniguruma, curl, sqlite3 configure
- Remove .a static archives from openssl and zlib after install
- Fix catch2 build/source cleanup (cd - && rm -fr build was a no-op)
- Remove cmake Help docs and man pages post-install (~10 MB)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* build: bump PHP versions across CI images
- PHP 8.5: RC3 -> 8.5.4 (stable) across centos-7, bookworm
- PHP 8.4: 8.4.1/8.4.16 -> 8.4.19 across centos-7, bookworm
- PHP 8.3: 8.3.14/8.3.29 -> 8.3.30 across centos-7, bookworm
- PHP 8.2: 8.2.26/8.2.28 -> 8.2.30 across centos-7, bookworm
- PHP 8.1: 8.1.8/8.1.31 -> 8.1.32 across centos-6, centos-7
- PHP 8.0: 8.0.15/8.0.21/8.0.27 -> 8.0.30 across centos-6, centos-7, alpine
- PHP 7.4: 7.4.30 -> 7.4.33 on centos-6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: drop ccmake, cpack, ctest
* build: pin sqlsrv and grpc PECL versions for PHP compatibility
- sqlsrv 5.13.0 raised minimum to PHP 8.3; pin PHP 8.1-8.2 to 5.12.0
- grpc 1.80.0 uses EG(max_allowed_stack_size) gated on PHP_VERSION_ID>=80300
but the field is absent in ASan builds because the ZEND_CHECK_STACK_LIMIT
autoconf test cannot execute sanitized binaries during configure; pin to
1.78.0 which predates that change
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* build: patch PHP 8.5 to disable preserve_none under ASan
preserve_none + -fsanitize=address crashes clang 19+ on x86-64
(llvm/llvm-project#95928). Apply a patch at source-tree build time
that guards ZEND_PRESERVE_NONE with __has_feature(address_sanitizer),
following the fix pattern from llvm-project commit 996157c.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* build: silence make recipe output in bookworm PHP builds
Adds -s (silent) to all make invocations in build-php.sh and to
MAKEFLAGS in build-extensions.sh (which covers pecl installs too).
Compiler errors still print via stderr; only the cc/ld recipe lines
are suppressed. Reduces log volume significantly given parallel stages.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* build: bump CI images from bookworm-6/5 to bookworm-7
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* build: update clang/llvm references from 17 to 19
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(centos-7): restore ctest, update clang/llvm/clang-tidy 17 → 19
ctest is required by the appsec C components ASAN job (make test calls
ctest internally). cpack remains removed as it is genuinely unused.
Also updates clang-tidy, llvm-cov, llvm-profdata, clang-format, and
libc++ references from version 17 to 19 in appsec CI and cmake config.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: put bookworm next down to 7 in case I need to rebuild
* fix: update remaining llvm17/clang17 references to 19
- Alpine compile extension image: llvm17-libs/clang17-dev/llvm17 → 19
- build-profiler.sh, generate-profiler.php, build-debug-artifact:
Alpine aarch64 clang symlink llvm17 → llvm19
- appsec/cmake/clang-format.cmake: llvm@17 → llvm@19
- centos-7 base.Dockerfile: remove -DCLANG_BUILD_TOOLS=OFF which
prevented the clang binary itself from being built/installed,
leaving broken symlinks and breaking bindgen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(appsec): find fuzzer runtime lib in Debian's linux/ layout
Newer clang versions return a per-target path from -print-runtime-dir
(e.g. .../lib/x86_64-pc-linux-gnu) but Debian/Ubuntu packages install
compiler-rt runtime libs in a sibling "linux/" directory. Add that as a
fallback search path for both find_library and target_link_directories.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(appsec): pass __VA_ARGS__ through CONFIG to SYSCFG to avoid empty variadic
clang 19 with -Werror,-Wc23-extensions rejects calling a variadic macro
with no argument for '...'. CONFIG's body called SYSCFG(type, name) with
only 2 args. Pass CONFIG's own __VA_ARGS__ through instead — CONFIG is
always called with at least a default value, so the variadic arg is never
empty. SYSCFG ignores the extra args in this context anyway.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style(appsec): clang-format-19 helper sources
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: bump bookworm NEXT version to 8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: revert CentOS 6 changes to avoid appearing that it's maintained
* fix(appsec): address clang-tidy 19 new checks
- acceptor.cpp: use designated initializer for timeval (layout is
system-dependent, so positional init is unsafe)
- extension/.clang-tidy: suppress checks new in clang-tidy 19 that fire
on pre-existing C code (math-missing-parentheses, macro-to-enum,
multi-level-implicit-pointer-conversion, redundant-casting)
- helper/.clang-tidy: suppress modernize-use-designated-initializers for
internal structs where positional init is unambiguous
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(appsec): separate void return from call expression in waf.cpp
clang-tidy 19 readability-avoid-return-with-void-value rejects
returning the result of a void function call.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci(appsec): revert clang-19 migration, keep clang-17, bump to bookworm-7
Reverts all appsec source/config changes that were made to accommodate
clang-19 warnings and formatting. Appsec jobs stay on clang-17 for now.
Bumps appsec CI image from bookworm-6 to bookworm-7.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci(appsec): revert bookworm-7, keep bookworm-6
bookworm-7 only ships clang-19 in its apt repo; appsec jobs still
need clang-17 so stay on bookworm-6 for now.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: xfail ext/sockets/tests/gh21161.phpt on PHP 8.4 and 8.5
The test lacks a SKIPIF guard for IPv6 availability. In CI (Kubernetes
pods), IPv6 is unavailable so socket_create() returns false, causing a
TypeError instead of the expected warnings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: suppress ASAN stack-use-after-return in sandbox observer bailout
zai_reset_observed_frame_post_bailout (PHP 8.0/8.1) calls
zend_observer_fcall_end_all after a sandbox bailout. At that point
current_observed_frame may point to a dummy_execute_data that was
stack-allocated inside zend_call_function and already freed by the
unwind. PHP 8.2+ is safe via zai_set_observed_frame(NULL).
Suppress for the "multiple observers" ASAN job while Bob investigates
a proper fix in zai_reset_observed_frame_post_bailout.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: suppress sandbox observer ASAN error in ZAI tests too
Same stack-use-after-return in zai_reset_observed_frame_post_bailout
seen in Zend Abstract Interface Tests with debug-zts-asan.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: use detect_stack_use_after_return=0 to suppress sandbox observer ASAN error
ASAN suppression files don't support fun: entries; that's TSan/LSan format.
Use detect_stack_use_after_return=0 in the affected jobs instead.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 78df648 commit 635ed66
File tree
25 files changed
+181
-138
lines changed- .github/workflows
- .gitlab
- appsec
- cmake
- tests/fuzzer
- dockerfiles/ci
- alpine_compile_extension
- bookworm
- php-8.5
- centos/7
- xfail_tests
- tooling/bin
25 files changed
+181
-138
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
1136 | 1136 | | |
1137 | 1137 | | |
1138 | 1138 | | |
1139 | | - | |
| 1139 | + | |
1140 | 1140 | | |
1141 | 1141 | | |
1142 | 1142 | | |
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
1310 | | - | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | | - | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
0 commit comments