1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.4' into PHP-8.5

* PHP-8.4:
  Fix broken build on *BSD with MSAN
This commit is contained in:
Ilija Tovilo
2025-10-02 00:44:55 +02:00
2 changed files with 5 additions and 2 deletions

1
NEWS
View File

@@ -4,6 +4,7 @@ PHP NEWS
- Core:
. Fix OSS-Fuzz #447521098 (Fatal error during sccp shift eval). (ilutov)
. Fixed bug GH-20002 (Broken build on *BSD with MSAN). (outtersg)
- BcMath:
. Fixed bug GH-20006 (Power of 0 of BcMath number causes UB). (nielsdos)

View File

@@ -500,8 +500,10 @@ ZEND_API zend_string *zend_string_concat3(
return res;
}
/* strlcpy and strlcat are not intercepted by msan, so we need to do it ourselves. */
#if __has_feature(memory_sanitizer)
/* strlcpy and strlcat are not always intercepted by msan, so we need to do it
* ourselves. Apply a simple heuristic to determine the platforms that need it.
* See https://github.com/php/php-src/issues/20002. */
#if __has_feature(memory_sanitizer) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
static size_t (*libc_strlcpy)(char *__restrict, const char *__restrict, size_t);
size_t strlcpy(char *__restrict dest, const char *__restrict src, size_t n)
{