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: 2 additions & 0 deletions .github/actions/configure-x64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,6 @@ runs:
${{ inputs.skipSlow == 'false' && '--with-pdo-firebird' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
--enable-werror \
${{ inputs.asan == 'true' && '--enable-address-sanitizer' || '' }} \
${{ inputs.asan == 'true' && '--enable-undefined-sanitizer' || '' }} \
${{ inputs.configurationParameters }}
14 changes: 9 additions & 5 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ jobs:
uses: ./.github/actions/configure-gentoo
with:
configurationParameters: >-
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
CFLAGS="-fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fno-sanitize=function"

@iluuu1994 iluuu1994 Jul 21, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is intentional. See #18535 / #20992.

CC=clang-17
CXX=clang++-17
--enable-debug
--enable-address-sanitizer
--enable-undefined-sanitizer
--enable-zts
skipSlow: false # FIXME: This should likely include slow extensions
- name: make
Expand Down Expand Up @@ -84,10 +86,12 @@ jobs:
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"
CFLAGS="-fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fno-sanitize=function"
--enable-debug
--enable-zts
--enable-address-sanitizer
--enable-undefined-sanitizer
skipSlow: true # FIXME: This should likely include slow extensions
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
Expand Down Expand Up @@ -165,7 +169,7 @@ jobs:
uses: ./.github/actions/configure-x64
with:
configurationParameters: >-
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address"' || '' }}
${{ matrix.asan && 'CFLAGS="-DZEND_TRACK_ARENA_ALLOC" LDFLAGS=""' || '' }}
${{ matrix.variation && 'CFLAGS="-DZEND_RC_DEBUG=1 -DPROFITABILITY_CHECKS=0 -DZEND_VERIFY_FUNC_INFO=1 -DZEND_VERIFY_TYPE_INFERENCE"' || '' }}
${{ (matrix.variation && fromJson(inputs.branch).jobs.LINUX_X64.config.variation_enable_zend_max_execution_timers) && '--enable-zend-max-execution-timers' || '' }}
--${{ matrix.debug && 'enable' || 'disable' }}-debug
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/grapheme/grapheme_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ U_CFUNC PHP_FUNCTION(grapheme_strrev)
UText *ut = nullptr;
UErrorCode ustatus = U_ZERO_ERROR;
UBreakIterator *bi;
char *pstr, *end, *p;
char *pstr, *p;
zend_string *ret;
int32_t pos = 0, current = 0, end_len = 0;

Expand Down
5 changes: 5 additions & 0 deletions ext/lexbor/config.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
PHP_LEXBOR_CFLAGS="-Wno-unknown-warning-option -Wno-unterminated-string-initialization -I@ext_srcdir@/"

if test "$PHP_ADDRESS_SANITIZER" = "yes"; then
PHP_LEXBOR_CFLAGS="$PHP_LEXBOR_CFLAGS -DLEXBOR_HAVE_ADDRESS_SANITIZER=1"
fi

LEXBOR_DIR="lexbor"

AC_DEFINE([HAVE_LEXBOR], [1], [Define to 1 if the PHP extension 'lexbor' is available.])
Expand Down
4 changes: 4 additions & 0 deletions ext/lexbor/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ ADD_SOURCES("ext/lexbor/lexbor/unicode", "idna.c unicode.c","lexbor");
ADD_SOURCES("ext/lexbor/lexbor/url", "url.c","lexbor");
ADD_FLAG("CFLAGS_LEXBOR", "/D LEXBOR_BUILDING /utf-8");

if (PHP_SANITIZER == "yes") {
ADD_FLAG("CFLAGS_LEXBOR", "/D LEXBOR_HAVE_ADDRESS_SANITIZER=1");
}

AC_DEFINE("HAVE_LEXBOR", 1, "Define to 1 if the PHP extension 'lexbor' is available.");

PHP_INSTALL_HEADERS("ext/lexbor", "php_lexbor.h lexbor/");
1 change: 1 addition & 0 deletions ext/lexbor/lexbor/core/mraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ lexbor_mraw_mem_alloc(lexbor_mraw_t *mraw, size_t length)
mem->chunk_length++;

#if defined(LEXBOR_HAVE_ADDRESS_SANITIZER)
printf("asd");
ASAN_POISON_MEMORY_REGION(mem->chunk->data, mem->chunk->size);
#endif
}
Expand Down
Loading