Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab/generate-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"8.3" => "20230831",
"8.4" => "20240924",
"8.5" => "20250925",
"8.6" => "20260924",
"8.6" => "20261112",
];

$all_minor_major_targets = array_keys($php_versions_to_abi);
Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/ci/alpine_compile_extension/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ services:
x-bake: *bake
args:
<<: *build-base
phpVersion: 8.6.0RC3
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC3.tar.gz
phpSha256Hash: "a40085cef8bfb560ed3649cd83879e768ab22fe4cee467aa56b1b795c92e057d"
phpApi: 20260924
phpVersion: 8.6.0RC7
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC7.tar.gz
phpSha256Hash: "68b753e1d45e1417c6874008500de66102963cf0791e8c541211e9386318722e"
phpApi: 20261112
volumes:
- ../../:/app
4 changes: 2 additions & 2 deletions dockerfiles/ci/bookworm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ services:
<<: *build-base
BUILD_BASE: ${CI_REGISTRY_IMAGE:-datadog/dd-trace-ci}:bookworm-$BOOKWORM_NEXT_VERSION
phpVersion: "8.6"
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC3.tar.gz
phpSha256Hash: "a40085cef8bfb560ed3649cd83879e768ab22fe4cee467aa56b1b795c92e057d"
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC7.tar.gz
phpSha256Hash: "68b753e1d45e1417c6874008500de66102963cf0791e8c541211e9386318722e"

php-8.5:
image: ${CI_REGISTRY_IMAGE:-datadog/dd-trace-ci}:php-8.5_bookworm-$BOOKWORM_NEXT_VERSION
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/ci/centos/7/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ services:
args:
<<: *build-base
phpVersion: "8.6"
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC3.tar.gz
phpSha256Hash: "a40085cef8bfb560ed3649cd83879e768ab22fe4cee467aa56b1b795c92e057d"
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC7.tar.gz
phpSha256Hash: "68b753e1d45e1417c6874008500de66102963cf0791e8c541211e9386318722e"
image: '${CI_REGISTRY_IMAGE:-datadog/dd-trace-ci}:php-8.6_centos-7-$CENTOS_NEXT_VERSION'
6 changes: 3 additions & 3 deletions dockerfiles/ci/windows/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ services:
context: .
args:
# Must match the tarball's top-level directory (see Dockerfile).
phpVersion: "8.6.0RC3"
phpVersion: "8.6.0RC7"
vsVersion: "vs18"
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC3.tar.gz
phpSha256Hash: "a40085cef8bfb560ed3649cd83879e768ab22fe4cee467aa56b1b795c92e057d"
phpTarGzUrl: https://downloads.php.net/~svpernova09/php-8.6.0RC7.tar.gz
phpSha256Hash: "68b753e1d45e1417c6874008500de66102963cf0791e8c541211e9386318722e"

php-8.5:
image: ${CI_REGISTRY_IMAGE:-datadog/dd-trace-ci}:php-8.5_windows
Expand Down
4 changes: 2 additions & 2 deletions loader/dd_library_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
#include "telemetry_reaper.h"

#define MIN_API_VERSION 320151012
#define MAX_API_VERSION 420260924
#define MAX_API_VERSION 420261112
#define MAX_INI_API_VERSION MAX_API_VERSION + 1

#define PHP_70_VERSION 20151012
#define PHP_71_VERSION 20160303
#define PHP_72_VERSION 20170718
#define PHP_80_VERSION 20200930
#define PHP_86_VERSION 20260924
#define PHP_86_VERSION 20261112

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the original ABI boundary for PHP 8.6 logging

On earlier PHP 8.6 release candidates using API 20260924, enabling DD_TRACE_DEBUG now makes ddloader_logv() take the pre-8.6 branch and pass a char * to _php_error_log(), even though those runtimes already require a zend_string *. This can crash PHP during the initial REASON_START telemetry call, before the loader can handle missing or incompatible extensions. Keep the logging-signature threshold at the API where that signature originally changed, independently of the new packaging ABI.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Preserve the logging cutoff for earlier PHP 8.6 runtimes

On earlier PHP 8.6 release candidates such as RC3, enabling DD_TRACE_DEBUG=1 now selects the legacy logging branch because their API number is 20260924. Those runtimes already require zend_string*, so _php_error_log() interprets a raw message buffer using the wrong layout, corrupting loader diagnostics. Startup logging occurs before package compatibility checks, so removing older extension binaries does not prevent this. Preserve the original logging cutoff independently of the maximum supported ABI.

Suggested change
#define PHP_86_VERSION 20261112
#define PHP_86_VERSION 20260924

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Preserve the original logging-signature ABI cutoff

On PHP 8.6 RC3 (ABI 20260924) with DD_TRACE_DEBUG=1, this new cutoff makes ddloader_logv() pass a char buffer to _php_error_log(), which already expects a zend_string pointer. That invalid argument can crash PHP during the initial injection log. The AppSec integration configuration still selects RC3 and enables debug logging. Keep the logging-signature cutoff at 20260924 independently of the latest supported ABI.

Suggested change
#define PHP_86_VERSION 20261112
#define PHP_86_VERSION 20260924

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Preserve the logging cutoff for earlier PHP 8.6 builds

On earlier PHP 8.6 builds with API 20260924 and DD_TRACE_DEBUG=1, this change selects the char* logging call although _php_error_log() already expects zend_string*. The first startup message reaches this call before compatibility checks, potentially crashing PHP. AppSec images still pin RC3. Preserve the original logging cutoff independently of the updated artifact ABI.

Suggested change
#define PHP_86_VERSION 20261112
#define PHP_86_VERSION 20260924

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session


#define MIN_PHP_VERSION "7.0"
#define MAX_PHP_VERSION "8.6"
Expand Down
2 changes: 1 addition & 1 deletion tooling/bin/build-debug-artifact
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ case "$php_version" in
8.3) php_api="20230831" ;;
8.4) php_api="20240924" ;;
8.5) php_api="20250925" ;;
8.6) php_api="20260924" ;;
8.6) php_api="20261112" ;;
*) echo "Error: unknown PHP version '$php_version'. Supported: 7.0–8.6." >&2; exit 1 ;;
esac

Expand Down
2 changes: 1 addition & 1 deletion tooling/bin/generate-final-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tmp_folder_final=$tmp_folder/final

architectures=(x86_64 aarch64)

php_apis=(20190902 20200930 20210902 20220829 20230831 20240924 20250925 20260924)
php_apis=(20190902 20200930 20210902 20220829 20230831 20240924 20250925 20261112)
if [[ -z ${DDTRACE_MAKE_PACKAGES_ASAN:-} ]]; then
php_apis+=(20151012 20160303 20170718 20180731)
fi
Expand Down
2 changes: 1 addition & 1 deletion tooling/bin/generate-ssi-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for architecture in "${architectures[@]}"; do
# Products
########################

php_apis=(20151012 20160303 20170718 20180731 20190902 20200930 20210902 20220829 20230831 20240924 20250925 20260924)
php_apis=(20151012 20160303 20170718 20180731 20190902 20200930 20210902 20220829 20230831 20240924 20250925 20261112)
for php_api in "${php_apis[@]}"; do
########################
# Trace
Expand Down
Loading