Skip to content
Merged
19 changes: 14 additions & 5 deletions .github/actions/ccache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ name: ccache
inputs:
name:
required: true
php_directory:
required: false
default: '.'
cc:
required: false
default: 'gcc'
cxx:
required: false
default: 'g++'
runs:
using: composite
steps:
- name: Get cache key
shell: bash
id: cache_key
run: |
major=$(cat main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
minor=$(cat main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
release=$(cat main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
major=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MAJOR_VERSION ([0-9]+)/\1/p')
minor=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_MINOR_VERSION ([0-9]+)/\1/p')
release=$(cat ${{ inputs.php_directory }}/main/php_version.h | sed -En 's/^#define PHP_RELEASE_VERSION ([0-9]+)/\1/p')
week=$(date +"%Y-%W")
prefix="${{ inputs.name }}-$major.$minor.$release"
echo "key=$prefix-$week" >> $GITHUB_OUTPUT
Expand All @@ -26,5 +35,5 @@ runs:
- name: Export CC/CXX
shell: bash
run: |
echo "CC=ccache gcc" >> $GITHUB_ENV
echo "CXX=ccache g++" >> $GITHUB_ENV
echo "CC=ccache ${{ inputs.cc }}" >> $GITHUB_ENV
echo "CXX=ccache ${{ inputs.cxx }}" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion .github/matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
$test_alpine = in_array('CI: Alpine', $labels, true);
$test_benchmarking = in_array('CI: Benchmarking', $labels, true);
$test_community = in_array('CI: Community', $labels, true);
$test_coverage = in_array('CI: COVERAGE', $labels, true);
$test_coverage = in_array('CI: Coverage', $labels, true);
$test_freebsd = in_array('CI: FreeBSD', $labels, true);
$test_libmysqlclient = in_array('CI: libmysqlclient', $labels, true);
$test_linux_ppc64 = in_array('CI: Linux PPC64', $labels, true);
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ jobs:
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
cc: clang-20
cxx: clang++-20
- name: ./configure
uses: ./.github/actions/configure-alpine
with:
configurationParameters: >-
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
CC=clang-20
CXX=clang++-20
--enable-debug
--enable-zts
skipSlow: true # FIXME: This should likely include slow extensions
Expand Down Expand Up @@ -396,10 +396,6 @@ jobs:
uses: ./.github/actions/apt-x64
- name: Install gcovr
run: sudo -H pip install gcovr
- name: ccache
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
- name: ./configure
uses: ./.github/actions/configure-x64
with:
Expand Down Expand Up @@ -712,10 +708,10 @@ jobs:
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
cc: clang
cxx: clang++
- name: ./configure
run: |
export CC=clang
export CXX=clang++
export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"
./buildconf --force
# msan requires all used libraries to be instrumented,
Expand Down Expand Up @@ -880,6 +876,7 @@ jobs:
uses: ./.github/actions/ccache
with:
name: "${{ github.job }}"
php_directory: php
- name: build PHP
run: |
cd php
Expand Down Expand Up @@ -1077,8 +1074,8 @@ jobs:
run: |-
set -x
php benchmark/generate_diff.php \
${{ github.sha }} \
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
${{ github.event.pull_request.head.sha }} \
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) \
> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v6
with:
Expand Down
10 changes: 9 additions & 1 deletion ext/opcache/jit/ir/ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,13 +1420,21 @@ bool ir_use_list_add(ir_ctx *ctx, ir_ref to, ir_ref ref)
if (old_size < new_size) {
/* Reallocate the whole edges buffer (this is inefficient) */
ctx->use_edges = ir_mem_realloc(ctx->use_edges, new_size);
if (n == ctx->use_edges_count) {
ctx->use_edges[n] = ref;
use_list->count++;
ctx->use_edges_count++;
return 1;
}
} else if (n == ctx->use_edges_count) {
ctx->use_edges[n] = ref;
use_list->count++;
ctx->use_edges_count++;
return 0;
}
memcpy(ctx->use_edges + ctx->use_edges_count, ctx->use_edges + use_list->refs, use_list->count * sizeof(ir_ref));
if (use_list->count) {
memcpy(ctx->use_edges + ctx->use_edges_count, ctx->use_edges + use_list->refs, use_list->count * sizeof(ir_ref));
}
use_list->refs = ctx->use_edges_count;
ctx->use_edges[use_list->refs + use_list->count] = ref;
use_list->count++;
Expand Down
Loading
Loading