Skip to content

Commit

Permalink
Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Oct 4, 2012
2 parents ab62ffa + 9e3396b commit 34eb787
Show file tree
Hide file tree
Showing 171 changed files with 2,054 additions and 892 deletions.
72 changes: 63 additions & 9 deletions .gdbinit
@@ -1,6 +1,19 @@
define set_ts
set $tsrm_ls = $arg0
end

document set_ts
set the ts resource, it is impossible for gdb to
call ts_resource_ex while no process is running,
but we could get the resource from the argument
of frame info.
end

define ____executor_globals
if basic_functions_module.zts
set $tsrm_ls = ts_resource_ex(0, 0)
if !$tsrm_ls
set $tsrm_ls = ts_resource_ex(0, 0)
end
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
else
Expand Down Expand Up @@ -38,12 +51,53 @@ define dump_bt
set $t = $arg0
while $t
printf "[%p] ", $t
if $t->function_state.function->common.function_name
if $t->function_state.arguments
set $count = (int)*($t->function_state.arguments)
printf "%s(", $t->function_state.function->common.function_name
set $fst = $t->function_state
if $fst.function->common.function_name
if $fst.arguments
set $count = (int)*($fst.arguments)

if $t->object
if $fst.function.common.scope
printf "%s->", $fst.function.common.scope->name
else
if !$eg
____executor_globals
end

set $known_class = 0
if $eg
set $handle = $t->object.value.obj.handle
set $handlers = $t->object.value.obj.handlers
set $zobj = (zend_object *)$eg.objects_store.object_buckets[$handle].bucket.obj.object

if $handlers->get_class_entry == &zend_std_object_get_class
set $known_class = 1

if $handlers.get_class_name
if $handlers.get_class_name != &zend_std_object_get_class_name
set $known_class = 0
end
end

if $known_class
printf "%s->", $zobj->ce.name
end
end
end

if !$known_class
printf "(Unknown)->"
end
end
else
if $fst.function.common.scope
printf "%s::", $fst.function.common.scope->name
end
end

printf "%s(", $fst.function->common.function_name
while $count > 0
set $zvalue = *(zval **)($t->function_state.arguments - $count)
set $zvalue = *(zval **)($fst.arguments - $count)
set $type = $zvalue->type
if $type == 0
printf "NULL"
Expand Down Expand Up @@ -73,7 +127,7 @@ define dump_bt
if $type == 7
printf "resource(#%d)", $zvalue->value.lval
end
if $type == 8
if $type == 8
printf "constant"
end
if $type == 9
Expand All @@ -89,7 +143,7 @@ define dump_bt
end
printf ") "
else
printf "%s() ", $t->function_state.function->common.function_name
printf "%s() ", $fst.function->common.function_name
end
else
printf "??? "
Expand Down Expand Up @@ -600,7 +654,7 @@ define zmemcheck
end
end
if $not_found
printf "no such block that begins at %p.\n", $aptr
printf "no such block that begins at %p.\n", $aptr
end
if $arg0 == 0
printf "-------------------------------------------------------------------------------\n"
Expand Down
6 changes: 3 additions & 3 deletions CODING_STANDARDS
Expand Up @@ -2,11 +2,11 @@
PHP Coding Standards
========================

This file lists several standards that any programmer, adding or changing
code in PHP, should follow. Since this file was added at a very late
This file lists several standards that any programmer adding or changing
code in PHP should follow. Since this file was added at a very late
stage of the development of PHP v3.0, the code base does not (yet) fully
follow it, but it's going in that general direction. Since we are now
well into the version 4 releases, many sections have been recoded to use
well into version 5 releases, many sections have been recoded to use
these rules.

Code Implementation
Expand Down
100 changes: 95 additions & 5 deletions NEWS
@@ -1,8 +1,84 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.4.7
?? ??? 2012, PHP 5.4.9

?? ??? 2012, PHP 5.4.8

- CLI server:
. Changed response to unknown HTTP method to 501 according to RFC.
(Niklas Lindgren).
. Support HTTP PATCH method. Patch by Niklas Lindgren, GitHub PR #190.
(Lars)

- Core:
. Added optional second argument for assert() to specify custom message. Patch
by Lonny Kapelushnik (lonny@lonnylot.com). (Lars)
. Support building PHP with the native client toolchain. (Stuart Langley)
. Added --offline option for tests. (Remi)
. Fixed bug #63162 (parse_url does not match password component). (husman)
. Fixed bug #63111 (is_callable() lies for abstract static method). (Dmitry)
. Fixed bug #63093 (Segfault while load extension failed in zts-build).
(Laruence)
. Fixed bug #62976 (Notice: could not be converted to int when comparing
some builtin classes). (Laruence)
. Fixed bug #62955 (Only one directive is loaded from "Per Directory Values"
Windows registry). (aserbulov at parallels dot com)
. Fixed bug #62907 (Double free when use traits). (Dmitry)
. Fixed bug #61767 (Shutdown functions not called in certain error
situation). (Dmitry)
. Fixed bug #60909 (custom error handler throwing Exception + fatal error
= no shutdown function). (Dmitry)
. Fixed bug #60723 (error_log error time has changed to UTC ignoring default
timezone). (Laruence)

- cURL:
. Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will
cause cpu Soaring). (Pierrick)

- Date:
. Fixed bug #62896 ("DateTime->modify('+0 days')" modifies DateTime object)
(Lonny Kapelushnik)
. Fixed bug #62561 (DateTime add 'P1D' adds 25 hours). (Lonny Kapelushnik)

- DOM:
. Fixed bug #63015 (Incorrect arginfo for DOMErrorHandler). (Rob)

- FPM:
. Fixed bug #62954 (startup problems fpm / php-fpm). (fat)
. Fixed bug #62886 (PHP-FPM may segfault/hang on startup). (fat)
. Fixed bug #63085 (Systemd integration and daemonize). (remi, fat)
. Fixed bug #62947 (Unneccesary warnings on FPM). (fat)
. Fixed bug #62887 (Only /status?plain&full gives "last request cpu"). (fat)
. Fixed bug #62216 (Add PID to php-fpm init.d script). (fat)

- OpenSSL:
. Implemented FR #61421 (OpenSSL signature verification missing RMD160,
SHA224, SHA256, SHA384, SHA512). (Mark Jones)

- SOAP
. Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
(Dmitry)

- SPL:
. Bug #62987 (Assigning to ArrayObject[null][something] overrides all
undefined variables). (Laruence)

- mbstring:
. Allow passing null as a default value to mb_substr() and mb_strcut(). Patch
by Alexander Moskaliov via GitHub PR #133. (Lars)

- Filter extension:
. Bug #49510: Boolean validation fails with FILTER_NULL_ON_FAILURE with empty
string or false. (Lars)

- Sockets
. Fixed bug #63000 (MCAST_JOIN_GROUP on OSX is broken, merge of PR 185 by
Igor Wiedler). (Lars)

13 Sep 2012, PHP 5.4.7

- Core:
. Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
. Fixed bug #62844 (parse_url() does not recognize //). (Andrew Faulds).
. Fixed bug #62829 (stdint.h included on platform where HAVE_STDINT_H is not
set). (Felipe)
Expand All @@ -22,15 +98,22 @@ PHP NEWS
constructor). (Stas)

- CURL:
. Fixed bug #62912 (CURLINFO_PRIMARY_* AND CURLINFO_LOCAL_* not exposed).
(Pierrick)
. Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)

- DateTime:
. Fixed bug #62852 (Unserialize invalid DateTime causes crash).
(reeze.xia@gmail.com)
- Intl:
. Fixed Spoofchecker not being registered on ICU 49.1. (Gustavo)
. Fix bug #62933 (ext/intl compilation error on icu 3.4.1). (Gustavo)
. Fix bug #62915 (defective cloning in several intl classes). (Gustavo)

- Installation:
. Fixed bug #62460 (php binaries installed as binary.dSYM). (Reeze Xia)

- PCRE:
. Fixed bug #55856 (preg_replace should fail on trailing garbage).
(reg dot php at alf dot nu)

- PDO:
. Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)

Expand All @@ -45,6 +128,10 @@ PHP NEWS
. Fixed bug (segfault due to PS(mod_user_implemented) not be reseted
when close handler call exit). (Laruence)

- SOAP
. Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
(Dmitry)

- SPL:
. Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray)
(Laruence)
Expand All @@ -54,6 +141,9 @@ PHP NEWS
. Fixed bug #62836 (Seg fault or broken object references on unserialize()).
(Laruence)

- FPM:
. Merged PR 121 by minitux to add support for slow request counting on PHP
FPM status page. (Lars)

16 Aug 2012, PHP 5.4.6

Expand Down Expand Up @@ -188,7 +278,7 @@ PHP NEWS

- Sockets:
. Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe)

- SPL:
. Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to
dot files). (Laruence)
Expand Down
37 changes: 15 additions & 22 deletions README.RELEASE_PROCESS
Expand Up @@ -127,33 +127,34 @@ Rolling a stable release

2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.

3. **Merge** all related sections in NEWS (f.e. merge the 4.4.1RC1 and 4.4.0 sections)
3. **Merge** all related sections in NEWS (f.e. merge the 5.4.1RC1 and 5.4.0 sections)

4. Commit those changes

5. run the "scripts/dev/credits" script in php-src and commit the changes in the
credits files in ext/standard.

6. tag the repository with the version f.e. "``cvs tag php_4_4_1``"
6. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
(of course, you need to change that to the version you're rolling an RC for).
When making 5.X release, you need to tag the Zend directory separately!!

7. Bump up the version numbers in ``main/php_version.h``, ``configure.in`` and
possibly ``NEWS`` again, to the **next** version. F.e. if the release candidate
was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless if we get
was "5.4.1RC1" then the new one should be "5.4.1RC2-dev" - regardless if we get
a new RC or not. This is to make sure ``version_compare()`` can correctly work.

8. Commit those changes

9. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4
branch if you're rolling 4.4.x releases).
9. Log in onto the snaps box and go into the correct tree (f.e. the PHP-5.4
branch if you're rolling 5.5.x releases).

10. You do not have to update the tree, but of course you can with "``cvs up -dP``".
10. You do not have to update the tree, but of course you can with "``git pull
origin <branch>``".

11. run: ``./makedist php 4.4.1``, this will export the tree, create configure
11. run: ``./makedist php 5.4.1``, this will export the tree, create configure
and build two tarballs (one gz and one bz2).

12. Commit those two tarballs to CVS (phpweb/distributions)
12. Commit those two tarballs to Git (php-distributions.git)

13. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created. Once
Expand All @@ -171,6 +172,9 @@ Getting the stable release announced

a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4)

b. In case multiple PHP minor versions are in active development you have
to manually copy the old information to include/releases.inc

2. Edit ``phpweb/include/version.inc`` and change (X=major release number):

a. ``$PHP_X_VERSION`` to the correct version
Expand All @@ -187,7 +191,7 @@ Getting the stable release announced
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")

3. Update the ChangeLog file for the given major version
f.e. ``ChangeLog-4.php`` from the NEWS file
f.e. ``ChangeLog-5.php`` from the NEWS file

a. go over the list and put every element on one line

Expand All @@ -207,9 +211,9 @@ f.e. ``ChangeLog-4.php`` from the NEWS file

V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``

4. ``cp releases/4_4_0.php releases/4_4_1.php``
4. ``cp releases/5_4_0.php releases/5_4_1.php``

5. ``cvs add releases/4_4_1.php``
5. ``git add releases/5_4_1.php``

6. Update the ``releases/*.php`` file with relevant data. The release
announcement file should list in detail:
Expand All @@ -232,17 +236,6 @@ to upgrade.
php-general@lists.php.net and internals@lists.php.net with a text similar to
http://news.php.net/php.internals/17222.

10. Update ``php-bugs-web/include/functions.php`` to include the new version
number, and remove the RC from there.

11. Update ``qaweb/include/release-qa.php``

- Update $QA_RELEASES with the appropriate information, which means bumping
the version number to an upcoming version.

Example: If PHP 5.3.7 is being released, then PHP 5.3.8 is the next QA version,
so replace 5.3.7 with 5.3.8 within $QA_RELEASES.

Re-releasing the same version (or -pl)
--------------------------------------

Expand Down
6 changes: 6 additions & 0 deletions Zend/tests/bug51394.phpt
Expand Up @@ -13,4 +13,10 @@ function eh()
set_error_handler("eh");
$a = $empty($b);
--EXPECTF--
Warning: Uncaught exception 'Exception' with message 'error!' in %sbug51394.php:4
Stack trace:
#0 %sbug51394.php(9): eh(8, 'Undefined varia...', '%s', 9, Array)
#1 {main}
thrown in %sbug51394.php on line 4

Fatal error: Function name must be a string in %sbug51394.php on line 9
24 changes: 24 additions & 0 deletions Zend/tests/bug60909_1.phpt
@@ -0,0 +1,24 @@
--TEST--
Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
--FILE--
<?php
register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
set_error_handler(function($errno, $errstr, $errfile, $errline){
echo "error($errstr)";
throw new Exception("Foo");
});

require 'notfound.php';
--EXPECTF--
error(require(notfound.php): failed to open stream: No such file or directory)
Warning: Uncaught exception 'Exception' with message 'Foo' in %sbug60909_1.php:5
Stack trace:
#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
#1 %sbug60909_1.php(8): require()
#2 {main}
thrown in %sbug60909_1.php on line 5

Fatal error: main(): Failed opening required 'notfound.php' (include_path='%s') in %sbug60909_1.php on line 8


!!!shutdown!!!

0 comments on commit 34eb787

Please sign in to comment.