Skip to content

Commit 63f57b5

Browse files
committed
Merge remote-tracking branch 'origin/master' into str_size_and_int64
* origin/master: (29 commits) Fixed test for commit 997be12 Add bug fix to NEWS Update UPGRADING according to bug fix fix test improve CURL tests to allow testing without separate server improve CURL tests to allow testing without separate server Fixed bug #67199 mb_regex_encoding mishmash Fix bug #67248 (imageaffinematrixget missing check of parameters) Fix bug #67247 spl_fixedarray_resize integer overflow fix news add tests stuff to README Updated NEWS Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245) Linux apparently does not like memcpy in overlapping regions... - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org) - Move checking - Fixed missing NULL check in SimpleXMLElement::xpath() - Fixed missing NULL check updated NEWS Bug #67238 Ungreedy and min/max quantifier bug in PCRE 8.34 upstream oops, 5.4 and 5.5 use malloc in TSRM ... Conflicts: ext/gd/gd.c
2 parents 1c5b635 + 072bbe9 commit 63f57b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+388
-242
lines changed

README.RELEASE_PROCESS

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,27 @@ because the sysadmins can not upgrade stuff then.
1111
2. Package two days before a release. So if the release is to be on Thursday,
1212
package on Tuesday. Think about timezones as well.
1313

14-
3. Ensure that Windows builds will work before packaging
15-
16-
4. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
14+
3. Ensure that the tests on Travis CI are green.
15+
See: https://travis-ci.org/php/php-src/builds
16+
It is recommended to do so a couple of days before the packaging day, to
17+
have enough time to investigate failures, communicate with the authors and
18+
commit the fixes.
19+
The RM for the branch is also responsible for keeping the CI green on
20+
ongoing bases between the releases. Check the CI status for your branch
21+
periodically and resolve the failures ASAP. See more in:
22+
https://wiki.php.net/rfc/travis_ci
23+
24+
4. Ensure that Windows builds will work before packaging
25+
26+
5. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
1727
Johannes/Stas/Derick/Ilia) before proceeding. Ideally make sure that for the
1828
first releases one of the previous RM's is around to answer questions. For the
1929
steps related to the php/QA/bug websites try to have someone from the webmaster
2030
team (Bjori) on hand.
2131

22-
5. Verify the tags to be extra sure everything was tagged properly.
32+
6. Verify the tags to be extra sure everything was tagged properly.
2333

24-
6. Moving extensions from/to PECL requires write acces to the destination.
34+
7. Moving extensions from/to PECL requires write acces to the destination.
2535
Most developers should have this.
2636

2737
Moving extensions from php-src to PECL
@@ -48,47 +58,49 @@ Rolling a non stable release (alpha/beta/RC)
4858

4959
1. Check windows snapshot builder logs (http://windows.php.net/downloads/snaps/ the last revision)
5060

51-
2. run the "scripts/dev/credits" script in php-src and commit the changes in the
61+
2. Check the tests at https://travis-ci.org/php/php-src/builds
62+
63+
3. run the "scripts/dev/credits" script in php-src and commit the changes in the
5264
credits files in ext/standard.
5365

54-
3. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
66+
4. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
5567

56-
4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
68+
5. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
5769
Do not use abbreviations for alpha and beta. Do not use dashes, you should
5870
``#define PHP_VERSION "5.4.22RC1"`` and not ``#define PHP_VERSION "5.4.22-RC1"``
5971

60-
5. Compile and make test, with and without ZTS, using the right Bison version
72+
6. Compile and make test, with and without ZTS, using the right Bison version
6173
(for example, for 5.5, Bison 2.4.1 is used)
6274

63-
6. Check ./sapi/cli/php -v output for version matching.
75+
7. Check ./sapi/cli/php -v output for version matching.
6476

65-
7. If all is right, commit the changes to the release branch with ``git commit -a``.
77+
8. If all is right, commit the changes to the release branch with ``git commit -a``.
6678

67-
8. Tag the repository release branch with the version, e.g.:
79+
9. Tag the repository release branch with the version, e.g.:
6880
``git tag -u YOURKEYID php-5.4.2RC2``
6981

70-
9. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
82+
10. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
7183
in the *main* branch (PHP-5.4 for example) to prepare for the **next** version.
7284
F.e. if the RC is "5.4.1RC1" then the new one should be "5.4.2-dev" - regardless if we get
7385
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
7486
Commit the changes to the main branch.
7587

76-
10. Push the changes to the main repo, the tag, the main branch and the release branch :
88+
11. Push the changes to the main repo, the tag, the main branch and the release branch :
7789
``git push --tags origin HEAD``
7890
``git push origin {main branch}``
7991
``git push origin {release branch}``
8092

81-
11. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
93+
12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
8294
and build three tarballs (gz, bz2 and xz).
8395

84-
12. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
96+
13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
8597
directory "downloads/". Copy them into there, so that the system can generate
8698
MD5 sums. If you do not have this directory, talk to Derick or Dan.
8799

88-
13. Now the RC can be found on http://downloads.php.net/yourname,
100+
14. Now the RC can be found on http://downloads.php.net/yourname,
89101
f.e. http://downloads.php.net/derick/
90102

91-
14. Once the release has been tagged, contact the PHP Windows development team
103+
15. Once the release has been tagged, contact the PHP Windows development team
92104
([email protected]) so that Windows binaries can be created. Once
93105
those are made, they should be placed into the same directory as the source snapshots.
94106

@@ -144,7 +156,8 @@ the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
144156
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
145157
Don't forget to update NEWS manually in an extra commit then.
146158

147-
3. Commit those changes
159+
3. Commit those changes. Ensure the tests at https://travis-ci.org/php/php-src/builds are
160+
still passing.
148161

149162
4. run the "scripts/dev/credits" script in php-src and commit the changes in the
150163
credits files in ext/standard.
@@ -154,7 +167,7 @@ credits files in ext/standard.
154167

155168
6. Check ./sapi/cli/php -v output for version matching.
156169

157-
7. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
170+
7. tag the repository with the version f.e. "``git tag -u YOURKEYID -s php-5.4.1``"
158171

159172
8. Push the tag f.e. "``git push origin php-5.4.1``"
160173

UPGRADING

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ PHP X.Y UPGRADE NOTES
44

55
1. Backward Incompatible Changes
66
2. New Features
7-
2. Changes in SAPI modules
8-
3. Deprecated Functionality
9-
4. Changed Functions
10-
5. New Functions
11-
6. New Classes and Interfaces
12-
7. Removed Extensions
13-
8. Other Changes to Extensions
14-
9. New Global Constants
15-
10. Changes to INI File Handling
16-
11. Other Changes
7+
3. Changes in SAPI modules
8+
4. Deprecated Functionality
9+
5. Changed Functions
10+
6. New Functions
11+
7. New Classes and Interfaces
12+
8. Removed Extensions
13+
9. Other Changes to Extensions
14+
10. New Global Constants
15+
11. Changes to INI File Handling
16+
12. Other Changes
1717

1818

1919
========================================
@@ -30,52 +30,52 @@ PHP X.Y UPGRADE NOTES
3030

3131

3232
========================================
33-
2. Changes in SAPI modules
33+
3. Changes in SAPI modules
3434
========================================
3535

3636

3737
========================================
38-
3. Deprecated Functionality
38+
4. Deprecated Functionality
3939
========================================
4040

4141

4242
========================================
43-
4. Changed Functions
43+
5. Changed Functions
4444
========================================
4545

4646

4747
========================================
48-
5. New Functions
48+
6. New Functions
4949
========================================
5050

5151

5252
========================================
53-
6. New Classes and Interfaces
53+
7. New Classes and Interfaces
5454
========================================
5555

5656

5757
========================================
58-
7. Removed Extensions
58+
8. Removed Extensions
5959
========================================
6060

6161

6262
========================================
63-
8. Other Changes to Extensions
63+
9. Other Changes to Extensions
6464
========================================
6565

6666

6767
========================================
68-
9. New Global Constants
68+
10. New Global Constants
6969
========================================
7070

7171

7272
========================================
73-
10. Changes to INI File Handling
73+
11. Changes to INI File Handling
7474
========================================
7575

7676

7777
========================================
78-
11. Other Changes
78+
12. Other Changes
7979
========================================
8080

8181
- Standard

ext/bz2/bz2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
230230
#endif
231231

232232
if (php_check_open_basedir(path_copy TSRMLS_CC)) {
233+
#ifdef VIRTUAL_DIR
234+
efree(path_copy);
235+
#endif
233236
return NULL;
234237
}
235238

@@ -239,6 +242,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
239242
if (opened_path && bz_file) {
240243
*opened_path = estrdup(path_copy);
241244
}
245+
#ifdef VIRTUAL_DIR
246+
efree(path_copy);
247+
#endif
242248
path_copy = NULL;
243249

244250
if (bz_file == NULL) {

ext/curl/tests/bug27023.phpt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files)
44
error_reporting = E_ALL & ~E_DEPRECATED
55
--SKIPIF--
66
<?php
7-
if (!extension_loaded("curl")) {
8-
exit("skip curl extension not loaded");
9-
}
10-
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
11-
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
12-
}
7+
include 'skipif.inc';
138
?>
149
--FILE--
1510
<?php
1611

17-
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
12+
include 'server.inc';
13+
$host = curl_cli_server_start();
1814
$ch = curl_init();
15+
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 0);
1916
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
2017
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
2118

ext/curl/tests/bug27023_2.phpt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
--TEST--
2+
Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files)
3+
--INI--
4+
error_reporting = E_ALL & ~E_DEPRECATED
5+
--SKIPIF--
6+
<?php include 'skipif.inc'; ?>
7+
--FILE--
8+
<?php
9+
10+
include 'server.inc';
11+
$host = curl_cli_server_start();
12+
$ch = curl_init();
13+
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
14+
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
15+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
16+
17+
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt');
18+
$params = array('file' => $file);
19+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
20+
var_dump(curl_exec($ch));
21+
22+
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain");
23+
$params = array('file' => $file);
24+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
25+
var_dump(curl_exec($ch));
26+
27+
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', null, "foo.txt");
28+
$params = array('file' => $file);
29+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
30+
var_dump(curl_exec($ch));
31+
32+
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain", "foo.txt");
33+
$params = array('file' => $file);
34+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
35+
var_dump(curl_exec($ch));
36+
37+
38+
curl_close($ch);
39+
?>
40+
--EXPECTF--
41+
string(%d) "curl_testdata1.txt|application/octet-stream"
42+
string(%d) "curl_testdata1.txt|text/plain"
43+
string(%d) "foo.txt|application/octet-stream"
44+
string(%d) "foo.txt|text/plain"

ext/curl/tests/bug45161.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
88
if (!extension_loaded("curl")) {
99
exit("skip curl extension not loaded");
1010
}
11-
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
12-
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
13-
}
1411
$curl_version = curl_version();
1512
if ($curl_version['version_number'] < 0x071100) {
1613
exit("skip: test works only with curl >= 7.17.0");

ext/curl/tests/bug46711.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ Bug #46711 (lost memory when foreach is used for values passed to curl_setopt())
55
if (!extension_loaded("curl")) {
66
exit("skip curl extension not loaded");
77
}
8-
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
9-
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
10-
}
118
?>
129
--FILE--
1310
<?php

ext/curl/tests/bug48203.phpt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
--TEST--
22
Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
33
--SKIPIF--
4-
<?php
5-
if (!extension_loaded("curl")) {
6-
exit("skip curl extension not loaded");
7-
}
8-
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
9-
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
10-
}
11-
?>
4+
<?php include 'skipif.inc'; ?>
125
--FILE--
136
<?php
14-
7+
include 'server.inc';
158
$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
169

1710
$ch = curl_init();
1811

1912
curl_setopt($ch, CURLOPT_VERBOSE, 1);
2013
curl_setopt($ch, CURLOPT_STDERR, $fp);
21-
curl_setopt($ch, CURLOPT_URL, getenv('PHP_CURL_HTTP_REMOTE_SERVER'));
14+
curl_setopt($ch, CURLOPT_URL, curl_cli_server_start());
2215

2316
fclose($fp); // <-- premature close of $fp caused a crash!
2417

ext/curl/tests/bug48203_multi.phpt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@
22
Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec)
33
--SKIPIF--
44
<?php
5-
if (!extension_loaded("curl")) {
6-
exit("skip curl extension not loaded");
7-
}
8-
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
9-
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
10-
}
5+
include 'skipif.inc';
116
?>
127
--FILE--
138
<?php
14-
9+
include 'server.inc';
1510
function checkForClosedFilePointer($curl_option, $description) {
1611
$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
1712

@@ -21,7 +16,7 @@ function checkForClosedFilePointer($curl_option, $description) {
2116
$options = array(
2217
CURLOPT_RETURNTRANSFER => 1,
2318
$curl_option => $fp,
24-
CURLOPT_URL => getenv("PHP_CURL_HTTP_REMOTE_SERVER")
19+
CURLOPT_URL => curl_cli_server_start()
2520
);
2621

2722
// we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly

ext/curl/tests/bug48207.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Test curl_setopt() CURLOPT_FILE readonly file handle
44
Mark van der Velden
55
#testfest Utrecht 2009
66
--SKIPIF--
7-
<?php if (!extension_loaded("curl")) print "skip"; ?>
7+
<?php include 'skipif.inc'; ?>
88
--FILE--
99
<?php
1010
/*
@@ -14,7 +14,8 @@ Mark van der Velden
1414
*/
1515

1616
// Figure out what handler to use
17-
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
17+
include 'server.inc';
18+
$host = curl_cli_server_start();
1819
if(!empty($host)) {
1920

2021
// Use the set Environment variable

0 commit comments

Comments
 (0)