Commit Graph

7989 Commits

Author SHA1 Message Date
Dmitry Stogov
03a37de9b3 Improved empty string handling. Now ZE uses an interned string instead of allocation new empty string each time. (Some extensions might need to be fixed using str_efree() instead of efree() to support interned strings). 2013-12-26 14:47:13 +04:00
Xinchen Hui
d6713f3989 Fixed warning "No new line at end of file" 2013-12-26 17:45:37 +08:00
Dmitry Stogov
ef56cfb991 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed ZEND_MM_MEM_TYPE=mmap_zero
2013-12-26 11:53:03 +04:00
Dmitry Stogov
0ff0e82f26 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed ZEND_MM_MEM_TYPE=mmap_zero

Conflicts:
	NEWS
2013-12-26 11:52:39 +04:00
Dmitry Stogov
6414fe283e Fixed ZEND_MM_MEM_TYPE=mmap_zero 2013-12-26 11:51:32 +04:00
Anatol Belski
f4a96983e1 Merge branch 'PHP-5.6'
* PHP-5.6:
  removed outdated IsDebuggerPresent declaration
2013-12-23 12:01:26 +01:00
Anatol Belski
19039984e2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  removed outdated IsDebuggerPresent declaration
2013-12-23 12:01:10 +01:00
Anatol Belski
3f7a145b5a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  removed outdated IsDebuggerPresent declaration
2013-12-23 12:00:49 +01:00
Anatol Belski
f156e684ac removed outdated IsDebuggerPresent declaration
This piece of code seems to retain compatibility with some windows
versions before 2000. Today it's not relevant anymore and only
produces a warning C4273 because of the conflicting prototype. In
VC9 the declaration is present in winbase.h:4142, but available
is it already in winxp. Here's the doc link
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680345(v=vs.85).aspx
2013-12-23 11:53:47 +01:00
Sara Golemon
6a2a2b52f9 Bump ZEND_MODULE_API_NO due to the TSRMLS change to zend_is_true() 2013-12-22 14:10:59 -08:00
krakjoe
704866d6fd opcodes 2013-12-22 13:20:41 +00:00
krakjoe
d455377fad opcodes 2013-12-22 13:20:17 +00:00
krakjoe
8ce521a6a7 missing, apparently 2013-12-22 13:19:35 +00:00
krakjoe
df9f2ad2e9 Merge branch 'PHP-5.6' of https://github.com/php/php-src into PHP-5.6 2013-12-22 13:17:21 +00:00
krakjoe
621862a192 Merge branch 'PHP-5.6'
* PHP-5.6:
  stop warnings from unused opcode map
  - BFN

Conflicts:
	NEWS
	Zend/zend_vm_opcodes.h
2013-12-22 13:15:40 +00:00
krakjoe
2a1b60569f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  stop warnings from unused opcode map
  - BFN
  - Fixed bug #66311 (Stack smashing protection kills PDO/ODBC queries) patch by: michael at orlitzky dot com
  Included new .c file in build too
  Fixed little typo in zend_vm_gen.php
  Moved to new file, killing a lot of warnings
2013-12-22 13:11:20 +00:00
krakjoe
247ec0d81f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  stop warnings from unused opcode map
  - BFN
2013-12-22 13:07:41 +00:00
krakjoe
b1df00a7c9 stop warnings from unused opcode map 2013-12-22 13:00:51 +00:00
Bob Weinand
5b1f6caaf0 Merge branch 'PHP-5.6' 2013-12-22 00:57:31 +01:00
Bob Weinand
129fb22b37 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	Zend/zend_vm_opcodes.c
2013-12-22 00:55:46 +01:00
Bob Weinand
7e3af096b3 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_opcodes.c
2013-12-22 00:54:59 +01:00
Bob Weinand
97bf254385 Included new .c file in build too 2013-12-22 00:52:05 +01:00
Bob Weinand
2874eba714 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	Zend/zend_vm_opcodes.h
2013-12-21 23:54:38 +01:00
Bob Weinand
00cc4dccb8 Fixed little typo in zend_vm_gen.php 2013-12-21 23:52:48 +01:00
Bob Weinand
0dd2765687 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_opcodes.h
2013-12-21 23:49:28 +01:00
Bob Weinand
61199be02f Moved to new file, killing a lot of warnings 2013-12-21 23:45:34 +01:00
Bob Weinand
0cc89be244 Merge branch 'PHP-5.6' 2013-12-21 21:33:15 +01:00
Bob Weinand
b14f31872b Merge branch 'PHP-5.5' into PHP-5.6 2013-12-21 21:32:42 +01:00
Bob Weinand
560f90e511 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_gen.php
	Zend/zend_vm_opcodes.h
2013-12-21 21:31:48 +01:00
Bob Weinand
7894e397d8 Fixed build... 2013-12-21 21:29:08 +01:00
Bob Weinand
e2b75e5bb7 Merge branch 'PHP-5.6' 2013-12-21 19:32:41 +01:00
Bob Weinand
9b4b5fa737 Merge branch 'PHP-5.5' into PHP-5.6 2013-12-21 19:31:27 +01:00
Bob Weinand
b52c300eca Merge branch 'PHP-5.4' into PHP-5.5 2013-12-21 19:27:58 +01:00
Bob Weinand
50d50c2f04 Added an opcode to opcode name map
That way extensions etc. don't have to maintain their own lists anymore.
Also as phpdbg is included and needs such a map, it'd be counterproductive to need to change two things on every new opcode.
2013-12-21 19:22:47 +01:00
Bob Weinand
b11b3d201f Fixed ZTS build. Needed to bump API version number. 2013-12-18 16:44:20 +01:00
Kalle Sommer Nielsen
aed4b086ac Eliminate the TSRMLS_FETCH() calls in the ticks functions and hook 2013-12-18 09:32:26 +01:00
Kalle Sommer Nielsen
bd58146ad6 Kill another TSRMLS_FETCH() in the zend extension loading code 2013-12-18 07:59:47 +01:00
Kalle Sommer Nielsen
2eb9bd316d Merge branch 'master' of https://git.php.net/push/php-src 2013-12-18 07:27:14 +01:00
Kalle Sommer Nielsen
d14670ccdb Eliminate another TSRMLS_FETCH() in i_zend_is_true()
# Affected extensions have all been updated, ext/opcache and ext/zip
# both have macros for cross version compatibility
2013-12-18 07:25:05 +01:00
Xinchen Hui
72389dd53f Merge branch 'PHP-5.6' 2013-12-17 15:37:26 +08:00
Xinchen Hui
b331a219be Use memcmp here is better 2013-12-17 15:37:10 +08:00
Xinchen Hui
a9c503bc27 Merge branch 'PHP-5.6' 2013-12-17 15:10:56 +08:00
Xinchen Hui
eeb37c40e6 Save one char compare 2013-12-17 15:09:52 +08:00
Xinchen Hui
5eb8d9d700 Merge branch 'PHP-5.6' of https://git.php.net/push/php-src into PHP-5.6 2013-12-15 16:55:29 +08:00
Eric Stenson
330168a247 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-15 16:51:21 +08:00
Xinchen Hui
304d97933f Merge branch 'issue-phpt-resourceid-wincache' of https://github.com/EricSten/php-src 2013-12-15 16:26:11 +08:00
Eric Stenson
50377b5bf2 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-13 10:42:32 -08:00
Xinchen Hui
914de05bf5 Merge branch 'PHP-5.6' 2013-12-13 11:37:53 +08:00
Xinchen Hui
6f95a07c41 Merge branch 'PHP-5.5' into PHP-5.6 2013-12-13 11:37:43 +08:00
Xinchen Hui
ef73f85079 Use zend_error_noreturn here 2013-12-13 10:56:35 +08:00
Kalle Sommer Nielsen
1433dec2d0 Kill another TSRMLS_FETCH() in zend_indent() 2013-12-12 22:09:38 +01:00
Kalle Sommer Nielsen
0fc8e6af0a Eliminate another straight forward TSRMLS_FETCH() in zend_startup_module()
# For THTTPD:
# The code that uses a call to this function is for older versions of PHP anyway so its not covered

# For Zend OpCache:
# Added a new define for 5.6 and wrapped the code around that so its still compatible with older version
2013-12-12 20:30:45 +01:00
Kalle Sommer Nielsen
4411641b1e Fix build 2013-12-12 20:25:10 +01:00
Xinchen Hui
dde552f2ee Add Tests for #65784 in 5.5 2013-12-13 01:45:45 +08:00
Xinchen Hui
54213b462d Disallowed JMP into a finally block. 2013-12-13 01:44:54 +08:00
Xinchen Hui
6a299514f8 Merge branch 'PHP-5.6'
Conflicts:
	NEWS
2013-12-13 00:54:36 +08:00
Xinchen Hui
794a888a48 Fixed bug #65784 (Segfault with finally). 2013-12-13 00:16:08 +08:00
Bob Weinand
98d929290c Merge branch 'PHP-5.6'
* PHP-5.6:
  Added one more test for constant scalar expressions
2013-12-11 19:20:10 +01:00
Bob Weinand
324291ebf2 Added one more test for constant scalar expressions 2013-12-11 19:17:07 +01:00
Remi Collet
8e29235b6c Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:10:48 +01:00
Remi Collet
45d8802441 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:10:20 +01:00
Remi Collet
9f4d1ee51c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:09:41 +01:00
Remi Collet
3e963f8eb4 Fixed Bug #66218 zend_register_functions breaks reflection
Functions registered using zend_register_functions instead of zend_module_entry.functions are not seen on reflection.

Ex: additional_functions from api_module_entry.
Ex: in CLI, dl, cli_set_process_title and cli_get_process_title

Note:
- also affects functions overrided in extension
  (should be be reported in extension, where overrided, not in original extension)
- also allow extension to call zend_register_functions for various list
  (instead of having a single bug list)
2013-12-10 16:07:16 +01:00
Dmitry Stogov
a46f644b3a Revered func_get_args() changes, because they were not completly transparent and broke some tricky PHP code that worked because of luck before php-5.5.6 (see Bug #66107). The changes are going to be kept in PHP-5.6. 2013-12-10 16:02:59 +04:00
Dmitry Stogov
4c3492b050 Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6
* 'PHP-5.6' of git.php.net:php-src:
  Zend: fix overflow handling bug in non-x86 fast_add_function()
2013-12-10 15:16:30 +04:00
Dmitry Stogov
1dafdaa31b Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Zend: fix overflow handling bug in non-x86 fast_add_function()
2013-12-10 15:15:46 +04:00
Dmitry Stogov
78265a44c5 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed memory leaks introdused by: 	commit 611da37617 	Author: Igor Wiedler <igor@wiedler.ch> 	Date:   Sat Nov 9 13:48:23 2013 -0500
2013-12-10 15:15:11 +04:00
Dmitry Stogov
49d7e98025 Fixed memory leaks introdused by:
commit 611da37617
	Author: Igor Wiedler <igor@wiedler.ch>
	Date:   Sat Nov 9 13:48:23 2013 -0500
2013-12-10 15:13:53 +04:00
Ard Biesheuvel
c786c30108 Merge branch 'PHP-5.6' 2013-12-10 12:12:44 +01:00
Ard Biesheuvel
60d2e70c06 Zend: fix overflow handling bug in non-x86 fast_add_function()
The 'result' argument of fast_add_function() may alias with either
of its operands (or both). Take care not to write to 'result' before
reading op1 and op2.
2013-12-10 12:12:14 +01:00
Dmitry Stogov
b260cb92e4 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class).
2013-12-10 14:21:38 +04:00
Dmitry Stogov
5a87b7ff39 Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class). 2013-12-10 14:19:17 +04:00
Stanislav Malyshev
912be12432 Merge branch 'PHP-5.6'
* PHP-5.6:
  Replace invalid code with a proper #error
2013-12-08 16:26:34 -08:00
Stanislav Malyshev
cfd5ea4301 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Replace invalid code with a proper #error
2013-12-08 15:53:41 -08:00
Stanislav Malyshev
744f35d2ab Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Replace invalid code with a proper #error
2013-12-08 15:52:56 -08:00
Lior Kaplan
c062c18d42 Replace invalid code with a proper #error
This code creates a nasty error as mentioned in bugs #31131, #37062
Patch taken from Debian's PHP package: 044-strtod_arm_fix
2013-12-08 15:49:22 -08:00
Ard Biesheuvel
bec62af141 Merge branch 'PHP-5.4' into PHP-5.5 2013-12-11 08:50:53 +01:00
Ard Biesheuvel
8f1fee61e2 Zend: fix overflow handling bug in non-x86 fast_add_function()
The 'result' argument of fast_add_function() may alias with either
of its operands (or both). Take care not to write to 'result' before
reading op1 and op2.
2013-12-11 08:50:20 +01:00
Ferenc Kovacs
e3ebe995c9 Merge branch 'PHP-5.6' 2013-12-06 11:07:36 +01:00
Ferenc Kovacs
562fa252ad Merge branch 'use-function' of git://github.com/igorw/php-src into igorw-use-function 2013-12-06 05:39:49 +01:00
Sebastian Bergmann
48cc47d55a Leftover: Bump version to 5.7.0 2013-12-03 07:42:37 +01:00
Dmitry Stogov
86c806a36e Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed ability to build non-specialized GOTO VM
2013-12-02 11:03:57 +04:00
Dmitry Stogov
9447181d0c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed ability to build non-specialized GOTO VM
2013-12-02 11:03:17 +04:00
Dmitry Stogov
7efcbecda9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed ability to build non-specialized GOTO VM

Conflicts:
	Zend/zend_vm_gen.php
2013-12-02 11:02:40 +04:00
Dmitry Stogov
9ed605892d Fixed ability to build non-specialized GOTO VM 2013-12-02 10:59:32 +04:00
Nikita Popov
1acee05579 Merge branch 'PHP-5.6' 2013-12-01 13:48:09 +01:00
Nikita Popov
b3546e64bd Merge branch 'PHP-5.5' into PHP-5.6 2013-12-01 13:45:22 +01:00
Nikita Popov
02dca18b90 Fix bug #65764
I'm not exactly sure whether this is the right way to fix it. The
question is whether Generator::throw() on a newborn generator (i.e.
a generator that is not yet at yield expression) should first advance to
the first yield and throw the exception there or whether it should
instead throw the exception in the caller's context.

The old behavior was to throw it at the start of the function (i.e.
the very first opcode), which causes issues like the one in #65764.
Effectively it's impossible to properly handle the exceptions in this
case.

For now I choose the variant where the generator advances to the
first yield before throwing, as that's consistent with how all other
methods on the Generator object currently behave. This does not
necessarily match the behavior in other languages, e.g. Python would throw
the exception in the caller's context. But then our send() method already
has this kind of deviation, so it stays internally consistent at least.
2013-12-01 13:37:56 +01:00
Nikita Popov
508738251f Merge branch 'PHP-5.6' 2013-11-30 13:41:22 +01:00
Nikita Popov
e2a8d7dc17 Merge branch 'PHP-5.5' into PHP-5.6 2013-11-30 13:40:17 +01:00
Nikita Popov
b4f00be6c4 Cleanup generator closing code a bit
All code dealing with unfinished execution cleanup is now in a separate
function (previously most of it was run even when execution was properly
finished.

Furthermore some code dealing with unclean shutdowns has been removed,
which is no longer necessary, because we no longer try to clean up in
this case.
2013-11-30 13:38:21 +01:00
Nikita Popov
9589cae8cb Fixed bug #66041: list() fails to unpack yielded ArrayAccess object
Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster as it avoids
doing a zval copy.
2013-11-30 13:08:31 +01:00
Nikita Popov
2e0a960e97 Merge branch 'PHP-5.6' 2013-11-29 23:59:21 +01:00
ArunSK
2e6d830590 Fixed unused value compiler warning 2013-11-29 23:58:41 +01:00
Dmitry Stogov
f65e652f9f Merge branch 'PHP-5.6'
* PHP-5.6:
  Added validation of class names in the autoload process
2013-11-29 12:55:38 +04:00
Dmitry Stogov
2cb0e1e4c1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added validation of class names in the autoload process

Conflicts:
	NEWS
2013-11-29 12:55:11 +04:00
Dmitry Stogov
967abd6153 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added validation of class names in the autoload process
2013-11-29 12:54:22 +04:00
Dmitry Stogov
2d31eadbbf Added validation of class names in the autoload process 2013-11-29 12:53:02 +04:00
Dmitry Stogov
77cdda452d Merge branch 'PHP-5.6'
* PHP-5.6:
  Avoid interned hash key duplication and hash key length recaclulation
2013-11-29 00:59:26 +04:00
Dmitry Stogov
6c2a806820 Avoid interned hash key duplication and hash key length recaclulation 2013-11-29 00:57:49 +04:00