diff options
author | Max Rees <maxcrees@me.com> | 2022-05-27 16:20:52 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-10-21 18:34:02 -0500 |
commit | 0198396fdd4296a886bb39e2b890e592be37f271 (patch) | |
tree | ad27e05fbb52c5b148f86ce926ab54174ac9c362 /user/php7/no-max-ent-size.patch | |
parent | 746769adba02cea5665624523811883df7b35100 (diff) | |
download | packages-0198396fdd4296a886bb39e2b890e592be37f271.tar.gz packages-0198396fdd4296a886bb39e2b890e592be37f271.tar.bz2 packages-0198396fdd4296a886bb39e2b890e592be37f271.tar.xz packages-0198396fdd4296a886bb39e2b890e592be37f271.zip |
user/php7: bump { 7.4.4 --> 7.4.30 }. disable tests. fixes #266, #267, #617.
* Drop getsockopt.patch [1]
* Parts of no-max-ent-size.patch are obsoleted by [2]
* Drop zip-glob-pathc.patch [3]
* Fix build with libgd-2.3.3
* Update secfixes
[1] https://github.com/php/php-src/commit/f1bf058d7cbb7eaa62c1850c0d931a2c2ee127db
[2] https://github.com/php/php-src/commit/6aff9a50cae40582d2571e7aa6f336d5c6a99547
[3] https://github.com/php/php-src/commit/04920645f14ea117d5248ef3a0e03c6784c2fb49
Failing tests:
ext/curl/tests/curl_basic_007.phpt
ext/gd/tests/bug38212-mb.phpt
ext/gd/tests/bug38212.phpt
ext/gd/tests/bug41442.phpt
ext/gd/tests/bug71912-mb.phpt
ext/gd/tests/bug71912.phpt
ext/gd/tests/bug72339.phpt
ext/gd/tests/bug73155.phpt
ext/gd/tests/bug73157.phpt
ext/gd/tests/bug73159.phpt
ext/gd/tests/bug73161.phpt
ext/gd/tests/bug73868.phpt
ext/gd/tests/bug79676.phpt
ext/gd/tests/crafted_gd2.phpt
ext/gd/tests/createfromgd2.phpt
ext/gd/tests/gif2gd.phpt
ext/gd/tests/imagegd_truecolor.phpt
ext/gd/tests/imagescale_preserve_ratio.phpt
ext/gd/tests/jpg2gd-mb.phpt
ext/gd/tests/jpg2gd.phpt
ext/gd/tests/png2gd.phpt
ext/gettext/tests/gettext_basic-enus.phpt
ext/gettext/tests/gettext_bindtextdomain-cwd.phpt
ext/gettext/tests/gettext_dcgettext.phpt
ext/gettext/tests/gettext_dgettext.phpt
ext/gettext/tests/gettext_dngettext-plural.phpt
ext/gettext/tests/gettext_ngettext.phpt
ext/pcntl/tests/pcntl_unshare_01.phpt
ext/pcre/tests/ctype_back_to_c.phpt
ext/standard/tests/strings/bug79986.phpt
Diffstat (limited to 'user/php7/no-max-ent-size.patch')
-rw-r--r-- | user/php7/no-max-ent-size.patch | 108 |
1 files changed, 17 insertions, 91 deletions
diff --git a/user/php7/no-max-ent-size.patch b/user/php7/no-max-ent-size.patch index 7f28ba3f1..d6552cf1c 100644 --- a/user/php7/no-max-ent-size.patch +++ b/user/php7/no-max-ent-size.patch @@ -1,6 +1,6 @@ ---- php-7.4.4/ext/posix/posix.c 2020-03-17 10:40:22.000000000 +0000 -+++ php-7.4.4/ext/posix/posix.c 2020-03-27 03:19:13.133440186 +0000 -@@ -1084,8 +1084,11 @@ PHP_FUNCTION(posix_getgrnam) +--- php-7.4.29/ext/posix/posix.c 2022-04-12 10:55:39.000000000 +0000 ++++ php-7.4.29/ext/posix/posix.c 2022-05-27 16:10:31.374379930 +0000 +@@ -1094,8 +1094,11 @@ PHP_FUNCTION(posix_getgrnam) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); #if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX) @@ -13,17 +13,7 @@ RETURN_FALSE; } buf = emalloc(buflen); -@@ -1127,9 +1130,7 @@ PHP_FUNCTION(posix_getgrgid) - { - zend_long gid; - #if defined(ZTS) && defined(HAVE_GETGRGID_R) && defined(_SC_GETGR_R_SIZE_MAX) -- int ret; - struct group _g; -- struct group *retgrptr = NULL; - long grbuflen; - char *grbuf; - #endif -@@ -1141,20 +1142,27 @@ PHP_FUNCTION(posix_getgrgid) +@@ -1151,8 +1154,11 @@ PHP_FUNCTION(posix_getgrgid) #if defined(ZTS) && defined(HAVE_GETGRGID_R) && defined(_SC_GETGR_R_SIZE_MAX) @@ -35,29 +25,8 @@ + } else if (grbuflen < 1) { RETURN_FALSE; } -- - grbuf = emalloc(grbuflen); -+try_again: -+ g = &_g; -- ret = getgrgid_r(gid, &_g, grbuf, grbuflen, &retgrptr); -- if (ret || retgrptr == NULL) { -- POSIX_G(last_error) = ret; -+ if (getgrgid_r(gid, g, grbuf, grbuflen, &g) || g == NULL) { -+ if (errno == ERANGE) { -+ grbuflen *= 2; -+ grbuf = erealloc(grbuf, grbuflen); -+ goto try_again; -+ } -+ POSIX_G(last_error) = errno; - efree(grbuf); - RETURN_FALSE; - } -- g = &_g; - #else - if (NULL == (g = getgrgid(gid))) { - POSIX_G(last_error) = errno; -@@ -1210,14 +1218,23 @@ PHP_FUNCTION(posix_getpwnam) +@@ -1226,8 +1232,11 @@ PHP_FUNCTION(posix_getpwnam) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) @@ -70,30 +39,7 @@ RETURN_FALSE; } buf = emalloc(buflen); -+try_again: - pw = &pwbuf; - - if (getpwnam_r(name, pw, buf, buflen, &pw) || pw == NULL) { -+ if (errno == ERANGE) { -+ buflen *= 2; -+ buf = erealloc(buf, buflen); -+ goto try_again; -+ } - efree(buf); - POSIX_G(last_error) = errno; - RETURN_FALSE; -@@ -1248,10 +1265,8 @@ PHP_FUNCTION(posix_getpwuid) - zend_long uid; - #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) - struct passwd _pw; -- struct passwd *retpwptr = NULL; - long pwbuflen; - char *pwbuf; -- int ret; - #endif - struct passwd *pw; - -@@ -1260,19 +1275,27 @@ PHP_FUNCTION(posix_getpwuid) +@@ -1282,8 +1291,11 @@ PHP_FUNCTION(posix_getpwuid) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) @@ -106,29 +52,9 @@ RETURN_FALSE; } pwbuf = emalloc(pwbuflen); -+try_again: -+ pw = &_pw; - -- ret = getpwuid_r(uid, &_pw, pwbuf, pwbuflen, &retpwptr); -- if (ret || retpwptr == NULL) { -- POSIX_G(last_error) = ret; -+ if (getpwuid_r(uid, pw, pwbuf, pwbuflen, &pw) || pw == NULL) { -+ if (errno == ERANGE) { -+ pwbuflen *= 2; -+ pwbuf = erealloc(pwbuf, pwbuflen); -+ goto try_again; -+ } -+ POSIX_G(last_error) = errno; - efree(pwbuf); - RETURN_FALSE; - } -- pw = &_pw; - #else - if (NULL == (pw = getpwuid(uid))) { - POSIX_G(last_error) = errno; ---- php-7.4.4/ext/standard/filestat.c 2020-03-17 10:40:30.000000000 +0000 -+++ php-7.4.4/ext/standard/filestat.c 2020-03-27 04:00:18.333479165 +0000 -@@ -302,15 +302,25 @@ PHPAPI int php_get_gid_by_name(const cha +--- php-7.4.29/ext/standard/filestat.c 2022-04-12 10:55:45.000000000 +0000 ++++ php-7.4.29/ext/standard/filestat.c 2022-05-27 16:12:23.176939839 +0000 +@@ -310,15 +310,25 @@ PHPAPI int php_get_gid_by_name(const cha #if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX) struct group gr; struct group *retgrptr; @@ -156,7 +82,7 @@ efree(grbuf); return FAILURE; } -@@ -438,15 +448,25 @@ PHPAPI uid_t php_get_uid_by_name(const c +@@ -446,15 +456,25 @@ PHPAPI uid_t php_get_uid_by_name(const c #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) struct passwd pw; struct passwd *retpwptr = NULL; @@ -184,9 +110,9 @@ efree(pwbuf); return FAILURE; } ---- php-7.4.4/main/fopen_wrappers.c 2020-03-17 10:40:21.000000000 +0000 -+++ php-7.4.4/main/fopen_wrappers.c 2020-03-27 04:08:46.553487201 +0000 -@@ -366,10 +366,13 @@ PHPAPI int php_fopen_primary_script(zend +--- php-7.4.29/main/fopen_wrappers.c 2022-04-12 10:55:38.000000000 +0000 ++++ php-7.4.29/main/fopen_wrappers.c 2022-05-27 16:13:13.063261295 +0000 +@@ -375,10 +375,13 @@ PHPAPI int php_fopen_primary_script(zend struct passwd *pw; #if defined(ZTS) && defined(HAVE_GETPWNAM_R) && defined(_SC_GETPW_R_SIZE_MAX) struct passwd pwstruc; @@ -201,7 +127,7 @@ return FAILURE; } -@@ -382,7 +385,14 @@ PHPAPI int php_fopen_primary_script(zend +@@ -391,7 +394,14 @@ PHPAPI int php_fopen_primary_script(zend memcpy(user, path_info + 2, length); user[length] = '\0'; #if defined(ZTS) && defined(HAVE_GETPWNAM_R) && defined(_SC_GETPW_R_SIZE_MAX) @@ -217,9 +143,9 @@ efree(pwbuf); return FAILURE; } ---- php-7.4.4/main/main.c 2020-03-17 10:40:21.000000000 +0000 -+++ php-7.4.4/main/main.c 2020-03-27 03:33:22.663453619 +0000 -@@ -1487,23 +1487,27 @@ PHPAPI char *php_get_current_user(void) +--- php-7.4.29/main/main.c 2022-04-12 10:55:38.000000000 +0000 ++++ php-7.4.29/main/main.c 2022-05-27 16:14:26.862749793 +0000 +@@ -1534,23 +1534,27 @@ PHPAPI char *php_get_current_user(void) struct passwd *pwd; #if defined(ZTS) && defined(HAVE_GETPWUID_R) && defined(_SC_GETPW_R_SIZE_MAX) struct passwd _pw; |