mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 03:51:30 +02:00
102 lines
3.8 KiB
Diff
102 lines
3.8 KiB
Diff
Patch-Source: https://github.com/php/php-src/commit/78fba9cb80c5ec2f9e375ef7ad09c6396c123ef2
|
|
|
|
diff --git a/ext/pcre/tests/gh11374.phpt b/ext/pcre/tests/gh11374.phpt
|
|
index 07f8f4bccfd0a..29f6485cc0440 100644
|
|
--- a/ext/pcre/tests/gh11374.phpt
|
|
+++ b/ext/pcre/tests/gh11374.phpt
|
|
@@ -1,5 +1,11 @@
|
|
--TEST--
|
|
GH-11374 (PCRE regular expression without JIT enabled gives different result)
|
|
+--EXTENSIONS--
|
|
+zend_test
|
|
+--SKIPIF--
|
|
+<?php
|
|
+if (!zend_test_is_pcre_bundled() && (PCRE_VERSION_MAJOR == 10 && PCRE_VERSION_MINOR <= 42)) die("skip old pcre version");
|
|
+?>
|
|
--FILE--
|
|
<?php
|
|
|
|
diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c
|
|
index c1c65450ea907..2f3ff6d9009e6 100644
|
|
--- a/ext/zend_test/test.c
|
|
+++ b/ext/zend_test/test.c
|
|
@@ -364,6 +364,16 @@ static ZEND_FUNCTION(zend_test_crash)
|
|
php_printf("%s", invalid);
|
|
}
|
|
|
|
+static ZEND_FUNCTION(zend_test_is_pcre_bundled)
|
|
+{
|
|
+ ZEND_PARSE_PARAMETERS_NONE();
|
|
+#if HAVE_BUNDLED_PCRE
|
|
+ RETURN_TRUE;
|
|
+#else
|
|
+ RETURN_FALSE;
|
|
+#endif
|
|
+}
|
|
+
|
|
static zend_object *zend_test_class_new(zend_class_entry *class_type)
|
|
{
|
|
zend_object *obj = zend_objects_new(class_type);
|
|
diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php
|
|
index 364792a5665e8..07d7fa7e19927 100644
|
|
--- a/ext/zend_test/test.stub.php
|
|
+++ b/ext/zend_test/test.stub.php
|
|
@@ -125,6 +125,8 @@ function zend_test_crash(?string $message = null): void {}
|
|
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
|
|
function zend_test_override_libxml_global_state(): void {}
|
|
#endif
|
|
+
|
|
+ function zend_test_is_pcre_bundled(): bool {}
|
|
}
|
|
|
|
namespace ZendTestNS {
|
|
diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h
|
|
index a8b84cbdeea62..6e3f645e3d143 100644
|
|
--- a/ext/zend_test/test_arginfo.h
|
|
+++ b/ext/zend_test/test_arginfo.h
|
|
@@ -1,5 +1,5 @@
|
|
/* This is a generated file, edit the .stub.php file instead.
|
|
- * Stub hash: 7effabe18579113dbfc4c61231d93c8c262d959a */
|
|
+ * Stub hash: ae75eda2b4b40224858d680c3fcf3d7cd2056bb6 */
|
|
|
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
|
|
ZEND_END_ARG_INFO()
|
|
@@ -91,9 +91,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global
|
|
ZEND_END_ARG_INFO()
|
|
#endif
|
|
|
|
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0, 0, _IS_BOOL, 0)
|
|
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_pcre_bundled, 0, 0, _IS_BOOL, 0)
|
|
ZEND_END_ARG_INFO()
|
|
|
|
+#define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_zend_test_is_pcre_bundled
|
|
+
|
|
#define arginfo_class__ZendTestClass_is_object arginfo_zend_get_map_ptr_last
|
|
|
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class__ZendTestClass___toString, 0, 0, 0)
|
|
@@ -112,7 +114,7 @@ ZEND_END_ARG_INFO()
|
|
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestChildClass_returnsThrowable, 0, 0, Exception, 0)
|
|
ZEND_END_ARG_INFO()
|
|
|
|
-#define arginfo_class__ZendTestTrait_testMethod arginfo_ZendTestNS2_ZendSubNS_namespaced_func
|
|
+#define arginfo_class__ZendTestTrait_testMethod arginfo_zend_test_is_pcre_bundled
|
|
|
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestParameterAttribute___construct, 0, 0, 1)
|
|
ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
|
|
@@ -156,6 +158,7 @@ static ZEND_FUNCTION(zend_test_crash);
|
|
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
|
|
static ZEND_FUNCTION(zend_test_override_libxml_global_state);
|
|
#endif
|
|
+static ZEND_FUNCTION(zend_test_is_pcre_bundled);
|
|
static ZEND_FUNCTION(namespaced_func);
|
|
static ZEND_METHOD(_ZendTestClass, is_object);
|
|
static ZEND_METHOD(_ZendTestClass, __toString);
|
|
@@ -199,6 +202,7 @@ static const zend_function_entry ext_functions[] = {
|
|
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
|
|
ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state)
|
|
#endif
|
|
+ ZEND_FE(zend_test_is_pcre_bundled, arginfo_zend_test_is_pcre_bundled)
|
|
ZEND_NS_FE("ZendTestNS2\\ZendSubNS", namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func)
|
|
ZEND_FE_END
|
|
};
|