Skip to content

Commit a188693

Browse files
committed
Merge branch 'PHP-5.4' of ssh://git.php.net/php-src into PHP-5.4
2 parents 80fe546 + 4ed133c commit a188693

File tree

91 files changed

+819
-450
lines changed

Some content is hidden

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

91 files changed

+819
-450
lines changed

Makefile.global

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ all: $(all_targets)
1010
@echo "Build complete."
1111
@echo "Don't forget to run 'make test'."
1212
@echo
13-
13+
1414
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
1515

1616
build-binaries: $(PHP_BINARIES)
@@ -116,7 +116,7 @@ clean:
116116
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
117117

118118
distclean: clean
119-
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
119+
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak
120120
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
121121

122122
.PHONY: all clean install distclean test

NEWS

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,26 @@ PHP NEWS
33
?? ??? 2013, PHP 5.4.19
44

55
- Core.
6+
. Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference
7+
fails). (Laruence)
68
. Fixed bug #65304 (Use of max int in array_sum). (Laruence)
79
. Fixed bug #65291 (get_defined_constants() causes PHP to crash in a very
810
limited case). (Arpad)
911
. Improve fix for bug #63186 (compile failure on netbsd). (Matteo)
12+
. Fixed bug #61268 (--enable-dtrace leads make to clobber
13+
Zend/zend_dtrace.d) (Chris Jones)
14+
. Cherry picked some DTrace build commits (allowing builds on Linux,
15+
bug 62691, and bug 63706) from PHP 5.5 branch
1016

1117
- Session:
1218
. Fixed bug #62129 (rfc1867 crashes php even though turned off). (gxd305 at
1319
gmail dot com)
1420
. Fixed bug #50308 (session id not appended properly for empty anchor tags).
1521
(Arpad)
1622

23+
- SOAP:
24+
. Fixed bug #65018 (SoapHeader problems with SoapServer). (Dmitry)
25+
1726
- SPL:
1827
. Fixed bug #65328 (Segfault when getting SplStack object Value). (Laruence)
1928

@@ -22,7 +31,7 @@ PHP NEWS
2231
some specific contents). (Stas)
2332

2433
- Pgsql:
25-
. Fixed bug #65336 (pg_escape_literal/identifier() scilently returns false).
34+
. Fixed bug #65336 (pg_escape_literal/identifier() silently returns false).
2635
(Yasuo)
2736

2837
?? ??? 2013, PHP 5.4.18

Zend/tests/bug60771.phpt

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

Zend/tests/bug65372.phpt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
--TEST--
2+
Bug #65372 (Segfault in gc_zval_possible_root when return reference fails)
3+
--FILE--
4+
<?php
5+
6+
class ParentClass
7+
{
8+
private static $_OBJECTS;
9+
10+
public static function Get()
11+
{
12+
self::$_OBJECTS[1] = new ChildClass();
13+
return self::$_OBJECTS[1];
14+
}
15+
}
16+
17+
class ChildClass extends ParentClass
18+
{
19+
public $Manager;
20+
21+
function __construct()
22+
{
23+
$this->Manager = $this;
24+
}
25+
26+
public static function &GetCurrent()
27+
{
28+
return ChildClass::Get();
29+
}
30+
31+
public static function &Get()
32+
{
33+
return parent::Get();
34+
}
35+
}
36+
37+
$staff = ChildClass::GetCurrent();
38+
?>
39+
--EXPECTF--
40+
Notice: Only variable references should be returned by reference in %sbug65372.php on line 30

Zend/tests/traits/bugs/overridding-conflicting-methods.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Overridding Conflicting Methods should not result in a notice/warning about collisions
2+
Overriding Conflicting Methods should not result in a notice/warning about collisions
33
--FILE--
44
<?php
55
error_reporting(E_ALL);

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2396,7 +2396,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
23962396
MAKE_STD_ZVAL(arg_array);
23972397
array_init(arg_array);
23982398

2399-
/* include_filename always points to the last filename of the last last called-fuction.
2399+
/* include_filename always points to the last filename of the last last called-function.
24002400
if we have called include in the frame above - this is the file we have included.
24012401
*/
24022402

Zend/zend_compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
17231723
}
17241724

17251725
{
1726-
/* Push a seperator to the switch and foreach stacks */
1726+
/* Push a separator to the switch and foreach stacks */
17271727
zend_switch_entry switch_entry;
17281728

17291729
switch_entry.cond.op_type = IS_UNUSED;
@@ -1817,7 +1817,7 @@ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /*
18171817
CG(active_op_array) = function_token->u.op_array;
18181818

18191819

1820-
/* Pop the switch and foreach seperators */
1820+
/* Pop the switch and foreach separators */
18211821
zend_stack_del_top(&CG(switch_cond_stack));
18221822
zend_stack_del_top(&CG(foreach_copy_stack));
18231823
}
@@ -2584,7 +2584,7 @@ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /*
25842584
{
25852585
zend_op *opline;
25862586

2587-
/* If we reach the seperator then stop applying the stack */
2587+
/* If we reach the separator then stop applying the stack */
25882588
if (foreach_copy->result_type == IS_UNUSED && foreach_copy->op1_type == IS_UNUSED) {
25892589
return 1;
25902590
}

Zend/zend_execute_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, const zend_
10721072
}
10731073

10741074
/* The compiler is not-reentrant. Make sure we __autoload() only during run-time
1075-
* (doesn't impact fuctionality of __autoload()
1075+
* (doesn't impact functionality of __autoload()
10761076
*/
10771077
if (!use_autoload || zend_is_compiling(TSRMLS_C)) {
10781078
if (!key) {

Zend/zend_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ struct _zend_php_scanner_globals {
306306
unsigned char *script_filtered;
307307
size_t script_filtered_size;
308308

309-
/* input/ouput filters */
309+
/* input/output filters */
310310
zend_encoding_filter input_filter;
311311
zend_encoding_filter output_filter;
312312
const zend_encoding *script_encoding;

Zend/zend_language_scanner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ typedef struct _zend_lex_state {
4444
unsigned char *script_filtered;
4545
size_t script_filtered_size;
4646

47-
/* input/ouput filters */
47+
/* input/output filters */
4848
zend_encoding_filter input_filter;
4949
zend_encoding_filter output_filter;
5050
const zend_encoding *script_encoding;

Zend/zend_vm_def.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,9 +2910,12 @@ ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
29102910
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
29112911
zend_error(E_NOTICE, "Only variable references should be returned by reference");
29122912
if (EG(return_value_ptr_ptr)) {
2913-
retval_ptr = *retval_ptr_ptr;
2914-
*EG(return_value_ptr_ptr) = retval_ptr;
2915-
Z_ADDREF_P(retval_ptr);
2913+
zval *ret;
2914+
2915+
ALLOC_ZVAL(ret);
2916+
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
2917+
zval_copy_ctor(ret);
2918+
*EG(return_value_ptr_ptr) = ret;
29162919
}
29172920
break;
29182921
}

Zend/zend_vm_execute.h

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,9 +2324,12 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HAND
23242324
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
23252325
zend_error(E_NOTICE, "Only variable references should be returned by reference");
23262326
if (EG(return_value_ptr_ptr)) {
2327-
retval_ptr = *retval_ptr_ptr;
2328-
*EG(return_value_ptr_ptr) = retval_ptr;
2329-
Z_ADDREF_P(retval_ptr);
2327+
zval *ret;
2328+
2329+
ALLOC_ZVAL(ret);
2330+
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
2331+
zval_copy_ctor(ret);
2332+
*EG(return_value_ptr_ptr) = ret;
23302333
}
23312334
break;
23322335
}
@@ -6743,9 +6746,12 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLE
67436746
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
67446747
zend_error(E_NOTICE, "Only variable references should be returned by reference");
67456748
if (EG(return_value_ptr_ptr)) {
6746-
retval_ptr = *retval_ptr_ptr;
6747-
*EG(return_value_ptr_ptr) = retval_ptr;
6748-
Z_ADDREF_P(retval_ptr);
6749+
zval *ret;
6750+
6751+
ALLOC_ZVAL(ret);
6752+
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
6753+
zval_copy_ctor(ret);
6754+
*EG(return_value_ptr_ptr) = ret;
67496755
}
67506756
break;
67516757
}
@@ -11055,9 +11061,12 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLE
1105511061
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
1105611062
zend_error(E_NOTICE, "Only variable references should be returned by reference");
1105711063
if (EG(return_value_ptr_ptr)) {
11058-
retval_ptr = *retval_ptr_ptr;
11059-
*EG(return_value_ptr_ptr) = retval_ptr;
11060-
Z_ADDREF_P(retval_ptr);
11064+
zval *ret;
11065+
11066+
ALLOC_ZVAL(ret);
11067+
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
11068+
zval_copy_ctor(ret);
11069+
*EG(return_value_ptr_ptr) = ret;
1106111070
}
1106211071
break;
1106311072
}
@@ -27030,9 +27039,12 @@ static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER
2703027039
} else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
2703127040
zend_error(E_NOTICE, "Only variable references should be returned by reference");
2703227041
if (EG(return_value_ptr_ptr)) {
27033-
retval_ptr = *retval_ptr_ptr;
27034-
*EG(return_value_ptr_ptr) = retval_ptr;
27035-
Z_ADDREF_P(retval_ptr);
27042+
zval *ret;
27043+
27044+
ALLOC_ZVAL(ret);
27045+
INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
27046+
zval_copy_ctor(ret);
27047+
*EG(return_value_ptr_ptr) = ret;
2703627048
}
2703727049
break;
2703827050
}

acinclude.m4

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,6 +2934,9 @@ dnl Add providerdesc.o into global objects when needed
29342934
*solaris*)
29352935
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
29362936
;;
2937+
*linux*)
2938+
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
2939+
;;
29372940
esac
29382941
29392942
dnl DTrace objects
@@ -2959,15 +2962,19 @@ dnl DTrace objects
29592962
esac
29602963
29612964
dnl Generate Makefile.objects entries
2965+
dnl The empty $ac_provsrc command stops an implicit circular dependency
2966+
dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
29622967
cat>>Makefile.objects<<EOF
29632968
2969+
$abs_srcdir/$ac_provsrc:;
2970+
29642971
$ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
2965-
dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@ && \$(SED) -ibak 's,PHP_,DTRACE_,g' \$[]@
2972+
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
29662973
29672974
\$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
29682975
29692976
$ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
2970-
dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
2977+
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
29712978
29722979
EOF
29732980
])

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ cat <<X
15821582
| see the file debug.log for error messages. |
15831583
| |
15841584
| If you are unable to fix this, send the file debug.log to the |
1585-
| php-install@lists.php.net mailing list and include appropiate |
1585+
| php-install@lists.php.net mailing list and include appropriate |
15861586
| information about your setup. |
15871587
X
15881588
fi

ext/date/php_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb)
13521352
}
13531353
/* }}} */
13541354

1355-
/* {{{ php_parse_date: Backwards compability function */
1355+
/* {{{ php_parse_date: Backwards compatibility function */
13561356
PHPAPI signed long php_parse_date(char *string, signed long *now)
13571357
{
13581358
timelib_time *parsed_time;

ext/date/php_date.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ ZEND_END_MODULE_GLOBALS(date)
165165
#define DATEG(v) (date_globals.v)
166166
#endif
167167

168-
/* Backwards compability wrapper */
168+
/* Backwards compatibility wrapper */
169169
PHPAPI signed long php_parse_date(char *string, signed long *now);
170170
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt);
171171
PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC);

ext/dom/tests/bug44648.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #44648 (Attribute names not checked for wellformedness)
2+
Bug #44648 (Attribute names not checked for well formedness)
33
--SKIPIF--
44
<?php require_once('skipif.inc'); ?>
55
--FILE--

ext/fileinfo/tests/magic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11969,7 +11969,7 @@
1196911969
#>65 string ZSYS (Pre-System 7 system file)
1197011970
#>65 string acf3 (Aldus FreeHand)
1197111971
#>65 string cdev (control panel)
11972-
#>65 string dfil (Desk Acessory suitcase)
11972+
#>65 string dfil (Desk Accessory suitcase)
1197311973
#>65 string libr (library)
1197411974
#>65 string nX^d (WriteNow word processor)
1197511975
#>65 string nX^w (WriteNow dictionary)

0 commit comments

Comments
 (0)