Commit Graph

1792 Commits

Author SHA1 Message Date
Nikita Popov
d7368c2531 Fix bug #67938: Segfault when extending interface method with variadic
We only want to check extra optional args if the proto function is
variadic, not when we're adding extra variadic args.
2014-08-30 20:43:34 +02:00
Nikita Popov
ae7e663330 Fix bug #67922 2014-08-29 00:18:38 +02:00
Anatol Belski
bf84517b64 fix dir separator 2014-08-28 11:56:27 +02:00
Tjerk Meesters
a79b933384 Fixed corruption of execute_data when ZEND_STRLEN has to cast an object to string. 2014-08-27 23:00:11 +08:00
Andrea Faulds
17c5e82816 Merge branch 'master' into Closure_apply 2014-08-27 01:53:26 +01:00
Nikita Popov
49b4e12e54 Add backup_doc_comment production
Bison can't detect the type of a mid-rule action, even if it accesses
$<str>$, so need to create a separate rule for this.
2014-08-26 22:31:58 +02:00
Nikita Popov
6db293d5e0 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_globals.h
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_types.h
2014-08-25 21:52:18 +02:00
Tjerk Meesters
d1d0f55e22 Use %d instead of object id 2014-08-23 08:09:08 +08:00
Tjerk Meesters
32e8d0f03e Fixed test case based on var_dump() changes made in c1965f58d4 2014-08-23 08:06:47 +08:00
Dmitry Stogov
b0a54673f4 Fixed wrong test. Value of the static property must not be changed to string. 2014-08-21 16:15:01 +04:00
Dmitry Stogov
cf09bc7825 Fixed bug #67874 (Crash in array_map()) 2014-08-20 22:06:15 +04:00
Andrea Faulds
cb770cdc03 Cast NaN and Infinity to zero 2014-08-19 20:21:23 +01:00
Dmitry Stogov
f3106998b0 Improved error message 2014-08-18 21:47:30 +04:00
Dmitry Stogov
0f5bad93fd Fixed bug #67856 (Leak when using array_reduce with by-ref function) 2014-08-18 21:08:50 +04:00
Nikita Popov
ced6d3068a Merge branch 'master' into ast 2014-08-18 18:16:11 +02:00
Nikita Popov
26a9dc3e04 Fix bug #67858: Leak when $php_errormsg already set 2014-08-18 18:14:19 +02:00
Nikita Popov
458f67cd21 Fix encoding declaration handling
As the encoding declaration influences lexing it needs to be
immidiately handled in the parser.
2014-08-18 16:27:53 +02:00
Andrea Faulds
594a768fef Revert "Fixed closure::bindTo bad args test"
This reverts commit 668d0683cd.
2014-08-18 14:51:40 +01:00
Andrea Faulds
59010bff01 Don't allow unbound scoped closures; make ->call used passed object as scope 2014-08-17 23:47:47 +01:00
Andrea Faulds
e35c8ae13e Merge branch 'master' into Closure_apply
Conflicts:
	Zend/zend_closures.c
	Zend/zend_closures.h
	Zend/zend_execute_API.c
	Zend/zend_vm_def.h
2014-08-17 17:20:02 +01:00
Nikita Popov
904a83a137 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	ext/opcache/Optimizer/optimize_func_calls.c
2014-08-16 22:31:13 +02:00
Timm Friebe
971d369d88 Add tests for calls to nested, *non*-compile-time-resolveable functions
See a1a4ba9511 (commitcomment-7414362)
2014-08-16 22:03:03 +02:00
Nikita Popov
71675a4bf8 Merge remote-tracking branch 'php-src/phpng' into ast
Conflicts:
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_language_parser.y

Incomplete merge!
2014-08-16 21:55:08 +02:00
Timm Friebe
c3d214aa08 MFH 2014-08-16 17:38:20 +02:00
Nikita Popov
919cb32f72 Fix memory usage test
Can't use peak memory usage because memory usage during compilation
is now larger
2014-08-15 17:44:15 +02:00
Dmitry Stogov
b01b971ec0 Parameters with duplicate names are not allowed anymore in PHP7. 2014-08-15 11:46:04 +04:00
Dmitry Stogov
ce1af1e47b Fixed bug #67725 (now we create immutable arrays only in SHM) 2014-08-05 15:38:43 +04:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Andrea Faulds
668d0683cd Fixed closure::bindTo bad args test 2014-08-03 14:48:14 +01:00
Andrea Faulds
a748f454a8 Merge branch 'master' into Closure_apply 2014-08-01 17:02:11 +01:00
Bob Weinand
d5ddd2dbb2 Disable restrictions regarding arrays in constants at run-time.
For the discussion around it, see the thread on the mailing list:
http://www.mail-archive.com/internals@lists.php.net/msg68245.html
2014-07-30 17:57:07 +02:00
Andrea Faulds
85bf8b4ff1 Fixed unbound scoped closure edge cases and added tests for them 2014-07-30 03:21:44 +01:00
Andrea Faulds
f65bdda469 Rename ::apply to ::call for the sake of JS consistency 2014-07-30 01:26:53 +01:00
Andrea Faulds
d67ec70a4c Added test for unbound_scoped 2014-07-29 19:08:21 +01:00
Andrea Faulds
167128d854 Implemented Closure::apply 2014-07-29 02:36:17 +01:00
Nikita Popov
17234d7895 Replicate old linenos for class binding 2014-07-26 18:36:57 +02:00
Dmitry Stogov
7c6477ce37 Merge branch 'master' into phpng
* master:
  Removed second zval_copy_ctor()
  Fixed crash on self-referencing constant expression (part of a constant AST)
  Fixed support for constant arrays in context of "const" statement (Zend/tests/constant_expressions_arrays.phpt failed when opcache.protect_memort was set)

Conflicts:
	Zend/zend_ast.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/reflection/php_reflection.c
2014-07-24 01:54:21 +04:00
Dmitry Stogov
d909b6330e Fixed crash on self-referencing constant expression (part of a constant AST) 2014-07-24 00:37:15 +04:00
Nikita Popov
d4d4b69e72 Merge branch 'phpng' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h

Some of dmitry's optimizations are not merged in yet!
2014-07-22 18:24:58 +02:00
Nikita Popov
b9be66ebf2 Implement declare() 2014-07-22 16:11:19 +02:00
Nikita Popov
2653b8b5dc Handle __halt_compiler() 2014-07-22 15:50:23 +02:00
Dmitry Stogov
f2a2fccece Merge branch 'master' into phpng
* master:
  fix nmake snap when ext name is different in target dll
  force atoll macro usage on windows
  Enable $ replacement in exif, ldap, pdo_pgsql and tidy
  See bug #67635
  NEWS
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
  Improve fix for #66608
  Fixed segfault with empty break
  New added opcodes don't need to be resloved
  Update NEWS
  Update NEWS
  Update NEWS
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
  implemented copy libs of core exts in phpize mode
  fix copy the ext dll into the prefix path in phpize mode
  fix default prefix in phpize mode
  fix file with zero size usage in phpize mode

Conflicts:
	Zend/zend_opcode.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/session/session.c
2014-07-22 15:42:17 +04:00
Nikita Popov
c60cd3e8ef Remove __clone test (not reason it should error) 2014-07-21 18:47:03 +02:00
Nikita Popov
61a6083e99 Fix some remaining class declaration issues 2014-07-21 18:15:09 +02:00
Xinchen Hui
1d2f232bd2 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-19 17:19:39 +08:00
Xinchen Hui
8ff00e6e85 Improve fix for #66608 2014-07-19 17:19:01 +08:00
Xinchen Hui
9ce1a36af2 Fixed segfault with empty break 2014-07-19 15:30:50 +08:00
Xinchen Hui
110bf9c720 Merge remote-tracking branch 'origin/master' into phpng
Conflicts:
	Zend/zend_compile.h
	ext/openssl/xp_ssl.c
2014-07-18 16:25:43 +08:00
Xinchen Hui
550b3e4306 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-07-18 15:48:56 +08:00
Xinchen Hui
de433d4c47 Fixed bug #66608 (Incorrect behavior with nested "finally" blocks) 2014-07-18 15:45:31 +08:00
Dmitry Stogov
de306e7088 Implement call_user_func() and call_user_func_array() using special opcodes.
In some rare cases it leads to insignificant changes in error messages.
2014-07-11 00:32:18 +04:00
Dmitry Stogov
bce6a36c8a Merge branch 'master' into test
* master: (48 commits)
  change locale - looks like not everybody has sl_SI
  Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
  fix format
  Fix bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting)
  Make sure the generator script also creates a newline at the end of file
  Add newline at end of file to prevent compilation warning
  Fix handling of session user module custom handlers.
  Reference bug report instead of github issue in NEWS file
  add more exts for Travis
  Update NEWS
  Fix phpdbg.1 man page installation when build != src directory
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA
  Update NEWS
  Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
  ...

Conflicts:
	ext/opcache/zend_accelerator_util_funcs.c
	ext/session/mod_user.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/standard/file.c
	ext/standard/streamsfuncs.c
	ext/standard/string.c
	main/streams/memory.c
2014-07-07 19:21:23 +04:00
Dmitry Stogov
477bd49cca Wrong expectation in tests (for some reason backtraces contained invlalid extra frame at the top) 2014-07-07 18:09:17 +04:00
Dmitry Stogov
4dd7c63d1e Wrong expectation in test (The error "Non-static method A::A_ftk() should not be called statically" is reported on caller side, so backtrace shouldn't include call to A::A_ftk()). 2014-07-07 17:27:16 +04:00
Dmitry Stogov
2f316a775d Wrong expectation in test (for some reason backtrace misses gc_collect_cycles() call) 2014-07-07 17:17:42 +04:00
Dmitry Stogov
70a112e51b Wrong expectation in test (wrong line number in backtrace) 2014-07-07 16:57:05 +04:00
Timm Friebe
067b622ce8 Adjust expected fatal error message
Now also includes "on [TYPE]" after merge from master
2014-07-06 17:56:48 +02:00
Timm Friebe
4a3a566a17 Check for memory leaks when not using return value 2014-07-06 17:08:25 +02:00
Timm Friebe
9b6062071e Adjust expected fatal error message
Now also includes "on [TYPE]" after merge from master
2014-07-06 17:07:41 +02:00
Timm Friebe
a1554ca634 Merge in changes from master
Now also includes "on [TYPE]" in "Call to a member function" error
2014-07-06 17:07:01 +02:00
Timm Friebe
e0d51d1cf0 Add tests with arrays as parameters 2014-07-06 16:40:21 +02:00
Timm Friebe
7e2e4ebc69 Handle ZEND_NEW nesting 2014-07-06 15:17:16 +02:00
Timm Friebe
d7156c1b31 Also verify nesting with dynamically called static methods 2014-07-06 15:12:15 +02:00
Timm Friebe
9dbc91f2ff Handle ZEND_INIT_NS_FCALL_BY_NAME nesting 2014-07-06 15:10:50 +02:00
Timm Friebe
7cd8ecb33f QA: Refactor: Split tests a bit to make them more comprehendable 2014-07-06 15:05:47 +02:00
Timm Friebe
ff66e59731 Support nested static calls 2014-07-06 14:58:44 +02:00
Timm Friebe
df908275f6 Handle ZEND_EXT_FCALL_END, skipping if necessary
Verified with running tests with new "-e" run-tests arg:
$ make test TESTS=Zend/tests/*-on-non-objects-*phpt TEST_PHP_ARGS=-e
# Tests passed    :   11 (100.0%)

$ make test TESTS=Zend/tests/*-on-non-objects-*phpt
# Tests passed    :   11 (100.0%)

Before, this would cause a SEGV. Thanks @nikic for raising this concern
2014-07-06 14:48:42 +02:00
Timm Friebe
e0cf63f4be Verify non-CV-operands also work
See discussion https://github.com/php/php-src/pull/647#issuecomment-48050551
2014-07-06 12:55:27 +02:00
Timm Friebe
dc68aa32bc Only allocate NULL return value if it's actually used 2014-07-06 12:50:32 +02:00
Timm Friebe
a782f697df Also handle nested function calls via variable 2014-07-06 12:44:02 +02:00
Timm Friebe
17b3791a01 Handle nesting correctly
See feedback by @nikic, https://github.com/php/php-src/pull/647#issuecomment-48050551
2014-07-06 12:27:04 +02:00
Nikita Popov
1ea4b17af2 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-02 17:36:27 +02:00
Nikita Popov
d9ebd0f3d6 Fix bug #67497: eval with parse error causes segfault in generator 2014-07-02 17:33:31 +02:00
Bob Weinand
1163a7ce24 Mark test as XFAIL until fixed 2014-07-02 17:25:47 +02:00
Bob Weinand
33699a4dab Messed up syntax of tests 2014-07-02 12:43:27 +02:00
Bob Weinand
09d1a8aaab Add tests for constant expression arrays
Adding one failing (!) test for now about circular constant references embedded in a constant AST, must be fixed before PHP 5.6 release.
2014-07-02 12:33:46 +02:00
Dmitry Stogov
acfbb7b6dc Merge branch 'master' into test
* master: (67 commits)
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
  --enable-fpm for the travis build
  fix the last fpm NEWS entry, the other bug is related, but not the same what we fixed here
  NEWS
  NEWS
  Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
  adding NEWS entry for the fix for bug #65641
  Updated NEWS file for recent phpdbg fixes
  Fixed issue krakjoe/phpdbg#94 - List behavior is inconsistent
  Fix issue krakjoe/phpdbg#97 - list now appends a newline if there is none The prompt should always ensure it is on a newline
  Fixed test
  Inform about back command existence in help - Fixes krakjoe/phpdbg#100 No way to list the current stack/frames
  Fix issue krakjoe/phpdbg#98 break if does not seem to work
  Fix issue krakjoe/phpdbg#99 register function has the same behavior as run
  Fix readline/libedit (Thanks to @remicollet)
  Replace incorrect `E` command with `ev` in watch help
  Fix typo in `finish` help
  ...

Conflicts:
	Zend/zend_ast.c
	Zend/zend_highlight.c
	Zend/zend_indent.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/info.c
2014-07-01 00:19:41 +04:00
Nikita Popov
e198132542 Drop addition of weird \ prefix for FQ consts
Also fixes a resolution bug
2014-06-28 18:24:59 +02:00
Xinchen Hui
9d49492fd6 Fixed bug #67368 (Memory leak with immediately dereferenced array in class constant) 2014-06-24 13:53:05 +08:00
Ferenc Kovacs
53158f2c32 testcase for 67468 (only for debug build, as I could not create a stable segfault without loading other exts like pgsql) 2014-06-23 10:10:17 +02:00
Nikita Popov
657762ee2b AST stage 2.4 2014-06-21 18:54:13 +02:00
Nikita Popov
0ec49bba22 AST stage 1.9
Expressions (mostly) use the AST
2014-06-19 13:48:35 +02:00
Dmitry Stogov
b108267f2c Merge branch 'master' into phpng
* master: (41 commits)
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  NEWS
  Fix Request #67453 Allow to unserialize empty data.
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
  Fix patch for bug #67436
  fix failed test
  Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
  Added tests for bug 67436
  Fixed wrong XFAIL test - already fixed
  Fix typo in Bug #67406 NEWS entry
  Fix typo in Bug #67406 NEWS entry
  ...

Conflicts:
	Zend/zend_compile.c
	ext/session/session.c
	ext/standard/array.c
	ext/standard/http_fopen_wrapper.c
	tests/classes/bug63462.phpt
2014-06-18 17:50:27 +04:00
Bob Weinand
7cef3a57ad Merge branch 'PHP-5.5' into PHP-5.6 2014-06-16 00:42:50 +02:00
Bob Weinand
03ee0ddc5f Merge branch 'PHP-5.4' into PHP-5.5 2014-06-16 00:41:46 +02:00
Levi Morrison
6c9c44905e Added tests for bug 67436 2014-06-15 16:31:39 -06:00
Nikita Popov
258a733ed2 AST-based compiler: Stage 1 2014-06-14 15:22:18 +02:00
Dmitry Stogov
dd1c68e67f Merge branch 'master' into phpng
* master: (77 commits)
  NEWS entry for Fix potential segfault in dns_get_record()
  NEWS entry for "Fix potential segfault in dns_get_record()"
  NEWS entry for Fix potential segfault in dns_get_record(
  Fix potential segfault in dns_get_record()
  Revert "Add optional second arg to unserialize()"
  5.5.15 now
  update NEWS
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.31 next
  Add NEWS. This doesn't need UPGRADING (or an RFC), IMO.
  Fix broken test.
  Add a mime type map generation script and update the header.
  Move the mime type map out of php_cli_server.c for easier generation.
  Replace the CLI server's linear search for extensions with a hash table.
  fix test
  Remove unused included file
  NEWS
  NEWS
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
  ...

Conflicts:
	Zend/zend_closures.c
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/spl/spl_array.c
	ext/standard/basic_functions.c
	ext/standard/dns.c
	ext/standard/var.c
2014-06-12 05:07:33 +04:00
Boro Sitnikovski
cfccdc6362 Bug 64744
Show the type of the non-object for more descriptive errors
2014-06-08 19:14:58 -07:00
Stanislav Malyshev
8f527fbf14 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug 666222
  Fix bug 666222
2014-06-08 19:02:24 -07:00
Levi Morrison
f47976dd9b Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.
2014-06-08 18:59:44 -07:00
Levi Morrison
e030efa4f6 Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-06-08 18:59:23 -07:00
Nikita Popov
c8aa51f825 Accept static member fetch in new variable (BC) 2014-06-06 17:05:14 +02:00
Dmitry Stogov
e4581fd6b8 GC doesn't count scalars and immutable arrays in the same way 2014-06-05 21:05:07 +04:00
Dmitry Stogov
3d87391cc0 Reference counters in PHPNG may have different values 2014-06-04 09:57:17 +04:00
Nikita Popov
8515b96e53 Handle FUNC_ARG fetches on temporaries 2014-05-31 20:15:55 +02:00
Nikita Popov
96b32ec532 Support isset() on temporaries 2014-05-31 20:05:03 +02:00
Nikita Popov
5c2120b6cf Forbid writing to temporary expressions 2014-05-31 19:41:39 +02:00
Nikita Popov
72b5e0cac0 Add another static member access test 2014-05-31 18:18:20 +02:00
Nikita Popov
f0ac7f7d7b Properly handle property read on const/tmp 2014-05-31 17:51:22 +02:00
Nikita Popov
c53a7ea4e5 Property handle calls on [] and '' consts/tmps 2014-05-31 17:37:30 +02:00
Nikita Popov
64e4c9eff1 Support directly calling closure 2014-05-31 17:18:37 +02:00
Nikita Popov
4ec505f9b5 Add two initial tests 2014-05-31 16:33:52 +02:00
Nikita Popov
c29d3b6e3e Update another test 2014-05-31 00:48:06 +02:00
Nikita Popov
c5920af515 Update two tests with new semantics 2014-05-31 00:40:32 +02:00
Nikita Popov
a8c1595012 LTR static member access 2014-05-30 22:33:03 +02:00
Nikita Popov
47e85b1b35 Improve class constant fetch fix
Dereference the cached constant for Test::TEST as well (and not just
self::TEST).

Also improve the phpt file to test this case as well - previously
this only manifested with opcache enabled, due to literal sharing.

Additionally the Z_TYPE_P != IS_REFERENCE assertion is now moved
into the TMP_VAR fetching code (as it applies to more than just
property assignments.)
2014-05-29 11:17:33 +02:00
Nikita Popov
d9a35c7e97 Fix class constant fetching
If a class is extended after the constant fetch has been cached
the cached value will be turned into a reference. On the next
fetch the polymorphic cache will return this reference, which
will be directly returned. The object assignment code then
dereferences this result and performs a shallow copy, which is
invalid for references. This subsequently leads to the constant
value being prematurely freed.

This is fixed by dereferencing the value returned from the
polymorphic cache. Furthermore the incorrect dereference from
in the object assignment code is replaced with an assertion that
we're dealing with a non-reference, so ensure that this kind of
problem cannot go unnoticed in the future.
2014-05-29 00:15:50 +02:00
Nikita Popov
4ee14c6f8d Fix ** operator with references 2014-05-26 18:17:55 +02:00
Nikita Popov
ff72c7bfd7 Add test for previous commit 2014-05-26 18:13:16 +02:00
Nikita Popov
9343f874cd Fix identical comparison of arrays with references
Also commit a test I forgot.
2014-05-09 15:46:43 +02:00
Dmitry Stogov
0c6a6f0fba Re-applyed Bob's patch with minor fixes 2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976 Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first). 2014-05-07 03:26:13 +04:00
Bob Weinand
f3c1881f1d Re-added fix for bug #66015 and adapted for phpng branch 2014-05-06 14:59:03 +02:00
Dmitry Stogov
cd4b4dfc4d Merge branch 'master' into refactoring2
Conflicts:
	Zend/zend_hash.c
	ext/date/php_date.c
2014-05-05 13:02:43 +04:00
Nikita Popov
69b5ee61d0 Fixed bug #67169: []= after_array_splice incorrect
This fixes a regression I introduced in beta 1.
2014-05-02 12:49:51 +02:00
Timm Friebe
7041ef44a6 Add tests verifying method calls on non-objects work inside eval() 2014-04-28 21:48:08 +02:00
Timm Friebe
da1db5e688 Add tests for indirect calls to methods on non-objects
http://news.php.net/php.internals/73823
2014-04-28 21:44:24 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Timm Friebe
a86e762166 Add test verifying chained method invocations 2014-04-20 12:47:18 +02:00
Timm Friebe
51a5e18433 Add example how framework code could convert E_RECOVERABLE -> exceptions 2014-04-19 15:32:16 +02:00
Timm Friebe
daf16d5683 Adjust expected outcome 2014-04-19 14:01:27 +02:00
Timm Friebe
bdb0cee222 Initial implementation 2014-04-19 14:01:16 +02:00
Anatol Belski
cfd20c90a5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:12 +02:00
Anatol Belski
d963cf94a5 refixed the test related to bug #67072 2014-04-18 15:16:09 +02:00
Stanislav Malyshev
ce4c78dd07 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed test case for 5328d42
2014-04-17 17:36:26 -07:00
Tjerk Meesters
5e988a888a Fixed test case for 5328d42 2014-04-17 17:36:03 -07:00
Dmitry Stogov
9629eea9e7 The test works out of the box 2014-04-14 22:43:33 +04:00
Ferenc Kovacs
20036525e2 Fix bug #66660: use str_efree instead of efree to handle interned empty strings correctly 2014-04-13 10:45:46 +02:00
Bob Weinand
ee2a7c7d41 Fixed disallowal of array usage in constants at run-time
Added at the same time the possibility of array dereferencing
to complete the set of features (useful application of arrays in constants)
2014-04-11 18:21:46 +02:00
Bob Weinand
f614fc6898 Fix bug #66015 by reverting "Removed operations on constant arrays." 2014-04-11 10:08:44 +02:00
Dmitry Stogov
c11dc75b4e Refactored IS_INDIRECT IS_VAR passing between opcodes to avoid reference counting 2014-04-04 19:01:53 +04:00
Dmitry Stogov
1968e6be65 Fixed tests (now objects are counted only once) 2014-03-20 11:54:24 +04:00
Tjerk Meesters
3d1fa4cb17 Allow T_POW in constant expressions 2014-03-07 09:14:27 +08:00
Dmitry Stogov
58918431e9 Fixed test 2014-03-04 23:30:56 +04:00
Nikita Popov
d3b484df82 Disallow use of positional args after unpacking
This commit disallows the use of trailing positional arguments
after argument unpacking was used. The following calls are no
longer valid:

    fn(...$array, $var);
    fn(...$array1, $var, ...$array2);

However, all of the following continue to be valid:

    fn($var, ...$array);
    fn(...$array1, ...$array2);
    fn($var, ...$array1, ...$array2);

The reason behind this change is a stack allocation issue pointed
out by Dmitry: As of PHP 5.5 the stack necessary for pushing
arguments is precomputed and preallocated, as such the individual
SEND opcodes no longer verify that there is enough stack space.
The unpacked arguments will occupy some of that preallocated
space and as such following positional arguments could write past
a stack page boundary.

An alternative resolution for this issue is to ensure that there
is enough space for the remaining arguments in the UNPACK opcode.
However making this allocation precise (rather than using a
conversative over-estimate) would require some effort. Given that
this particular aspect of the feature wasn't very popular in the
first place, it doesn't seem worth the effort.
2014-02-26 16:40:25 +01:00
Anatol Belski
5d0d88d1f2 fixed path separator in the tests 2014-02-21 00:23:01 +01:00
Sara Golemon
14c08ea362 Add more tests for __debugInfo() and fix leak 2014-02-20 12:10:00 -08:00
Sara Golemon
1e752ce9c5 Add __debugInfo() magic method
class Foo {
  private $val = 'Random, meaningless data';

  public function count() { return 42; }

  public function __debugInfo() {
    return ['count' => $this->count()];
  }
}

$f = new Foo;
var_dump($f);
2014-02-17 19:33:56 -08:00
Nikita Popov
31a2ac470c Fix argument unpacking across stack pages
If multiple unpacks were used (or mixed with normal arguments)
parts of the arguments could land on different stack pages. If
this occurs the arguments will now be copied to a new stack page.

The code used to do this is copied verbatim from the PHP 5.4 branch
and only modified to reduce the amount of inlined code.
2014-01-18 14:41:33 +01:00
Nikita Popov
2c47dfbaeb Implement argument unpacking
RFC: https://wiki.php.net/rfc/argument_unpacking
2014-01-11 12:42:08 +01:00
Nikita Popov
72a16851f4 Merge branch 'PHP-5.5' into PHP-5.6 2014-01-04 01:29:15 +01:00
Nikita Popov
d992a972c0 Merge branch 'PHP-5.4' into PHP-5.5 2014-01-04 01:24:54 +01:00
Nikita Popov
7e8e21df0c Fix bug #66286: Incorrect object comparison with inheritance
std_compare_objects immidiately returned 0 if the property tables
of both objects contain NULL at some index. Thus it would report
objects as equal even though properties following after that
differ.
2014-01-04 01:22:14 +01: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
dde552f2ee Add Tests for #65784 in 5.5 2013-12-13 01:45:45 +08:00
Xinchen Hui
794a888a48 Fixed bug #65784 (Segfault with finally). 2013-12-13 00:16:08 +08:00
Bob Weinand
324291ebf2 Added one more test for constant scalar expressions 2013-12-11 19:17:07 +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
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
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
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
e2a8d7dc17 Merge branch 'PHP-5.5' into PHP-5.6 2013-11-30 13:40:17 +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
Bob Weinand
d36cf90291 Merge branch 'const_scalar_exprs' into PHP-5.6
Conflicts:
	Zend/zend_extensions.h
2013-11-28 13:41:42 +01:00
Dmitry Stogov
fcb98cbce8 Fixed tests 2013-11-27 21:04:00 +04:00
Dmitry Stogov
43e3933fa3 Removed deprecated AI_SET_PTR()s 2013-11-27 20:30:35 +04:00
Dmitry Stogov
a908afeaa5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #65969 (Chain assignment with T_LIST failure)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-11-27 14:56:18 +04:00
Dmitry Stogov
92b76680e9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65969 (Chain assignment with T_LIST failure)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-11-27 14:39:40 +04:00
Dmitry Stogov
16d59aa171 Fixed bug #65969 (Chain assignment with T_LIST failure) 2013-11-27 14:26:34 +04:00
Igor Wiedler
24e0b99103 Merge remote-tracking branch 'upstream/PHP-5.6' into use-function
* upstream/PHP-5.6: (399 commits)
  Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled).
  Added tests for PHAR/OPCahce incompatibilities
  Update NEWS
  Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
  Update NEWS
  Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
  NEWS entry
  NEWS entry
  Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings
  bump API versions
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Revert "Fixed issue #115 (path issue when using phar)."
  Update LiteSpeed SAPI code to V6.4
  Fixed typo in Makefile.frag
  updated NEWS
  Remove outdate codes, make it clearer, although just a bit..
  Update NEWS
  ...

Conflicts:
	Zend/zend_compile.h
2013-11-08 19:14:58 -05:00
Bob Weinand
152898ff28 Moved arrays again to "static_scalar:" & little cleanup 2013-11-07 16:39:47 +01:00
Bob Weinand
ad967e1329 Added a few more operators 2013-11-03 01:58:39 +01:00
Bob Weinand
466c5dd1fe Fixed mem leaks, added tests and ternary operator 2013-10-31 18:21:37 +01:00
Nikita Popov
d51553e399 Merge branch 'PHP-5.5' 2013-10-16 18:39:13 +02:00
Nikita Popov
865f221627 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-16 18:37:49 +02:00
bwoebi
4c0bb6d76e Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.
2013-10-16 18:33:14 +02:00
Igor Wiedler
602fef0e52 Clarify type of use in error messages 2013-10-14 23:32:11 +02:00
Igor Wiedler
e23ad4eeb2 Add "Done" output to distinguish hard from soft failures 2013-10-14 23:21:06 +02:00
Nikita Popov
cbf0683c6f Merge branch 'PHP-5.5' 2013-09-29 20:19:40 +02:00
Nikita Popov
6b68f44e6b Fix bug #64979: Wrong behavior of static variables in closure generators 2013-09-29 20:18:12 +02:00
Nikita Popov
9529b8f5c4 Merge branch 'PHP-5.5' 2013-09-29 18:01:42 +02:00
Nikita Popov
1d1fb69c8b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-29 18:01:18 +02:00
Nikita Popov
f0c926564c Fix bug #65322: compile time errors won't trigger auto loading
Also fixes duplicate bugs #54054 and #42098.

Furthermore this fixes incorrect error messages thrown from code
running inside an error handler when a compilation is in progress.
The error file and line are now correctly associated with the
file/line of the executor, rather than the compiler.
2013-09-29 17:58:25 +02:00
Nikita Popov
0d7a638866 Implement variadic function syntax
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02:00
Xinchen Hui
825c1f239b Merge branch 'PHP-5.5' 2013-09-02 16:16:15 +08:00
Xinchen Hui
b2ee1b629e Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:16:07 +08:00
Xinchen Hui
6c48c6bc78 Typo.... 2013-09-02 16:15:52 +08:00
Xinchen Hui
f33bdf68b1 Merge branch 'PHP-5.5' 2013-09-02 16:03:10 +08:00
Xinchen Hui
dd1cbd140b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:02:59 +08:00
Xinchen Hui
ed038d2ee3 Add a XFAIL test for #64896 2013-09-02 16:02:24 +08:00
Gustavo André dos Santos Lopes
d515455589 Implement phase 1 of rfc/incompat_ctx
Just changing the error level of the message from E_STRICT to
E_DEPRECATED. This comes one version later than the timeline
mentioned in the RFC.

Oddly, there were no tests for this ‘feature’. I added a simple
one.
2013-09-02 01:53:06 +02:00
Anthony Ferrara
d7e3aca9c9 Fix issue with global fallback when not in global space 2013-08-30 11:53:57 -04:00
Xinchen Hui
a607a08e09 Merge branch 'PHP-5.5' 2013-08-30 11:23:24 +08:00
Xinchen Hui
e4fe53e200 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-30 11:20:46 +08:00
Xinchen Hui
7da6498342 Fixed bug #60598 (cli/apache sapi segfault on objects manipulation) 2013-08-30 11:20:24 +08:00
Igor Wiedler
e14a769c56 Add test for conditional function declaration 2013-08-29 17:16:18 +02:00
Xinchen Hui
0ea00936be Merge branch 'PHP-5.5' 2013-08-29 14:02:53 +08:00
Xinchen Hui
f0cb67402f Merge branch 'PHP-5.4' into PHP-5.5 2013-08-29 14:01:54 +08:00
Adam Harvey
72027cd084 Fix bug #65579 (Using traits with get_class_methods causes segfault).
Specifically, this checks if there are trait aliases defined in the class scope
before attempting to dereference the first trait alias. This handles the case
where a trait alias was used in a child trait but no aliases exist in the
concrete class.
2013-08-28 20:33:42 -07:00
Igor Wiedler
6263f221ff Handle case sensivity of constants (nikic) 2013-08-25 16:21:51 +02:00
Igor Wiedler
84c8aa3691 self and parent are valid function and const names (nikic) 2013-08-25 15:08:26 +02:00
Igor Wiedler
bc473228c8 Adjust some test names, remove obsolete and duplicate tests (nikic) 2013-08-25 14:03:07 +02:00
Igor Wiedler
85d4cfb00d Disallow using functions/consts defined in the same file
* Keep track of defined function and const filenames
* Prohibit use function foo if function foo exists
* Prohibit use const foo if const foo exists
2013-08-25 00:02:46 +02:00
Igor Wiedler
5b18530e8c Add test cases for conflicting use and definition in same ns (stas) 2013-08-23 23:31:17 +02:00
Igor Wiedler
31d77053a1 More test cases for conflicting aliases 2013-08-22 15:51:26 +02:00
Igor Wiedler
2dbbb8ae4b Add test case for conflicting use and use function alias (stas) 2013-08-22 15:51:26 +02:00
Igor Wiedler
4adf49eeaf Import namespaced constants via new 'use const' sequence 2013-08-22 15:51:26 +02:00
Igor Wiedler
e1125a6a89 Correctly distinguish between functions and constants
So far 'use function' applied to both constants and functions. This
patch correctly separates the two.
2013-08-22 15:51:26 +02:00
Igor Wiedler
5dd41627be Add new 'use function' sequence for importing namespaced functions
This is specified as the use_function RFC:

* https://wiki.php.net/rfc/use_function
2013-08-22 15:51:25 +02:00
Stanislav Malyshev
42214b6474 Merge branch 'PHP-5.5'
* PHP-5.5:
  Use in preg_replace_callback() using variables by reference and test for bug #64979
  https://bugs.php.net/bug.php?id=64979
2013-08-18 15:19:27 -07:00
Marcel Araujo
265224778b Use in preg_replace_callback() using variables by reference and test for bug #64979 2013-08-18 15:18:30 -07:00
Marcel Araujo
47678c06c6 https://bugs.php.net/bug.php?id=64979 2013-08-18 15:09:43 -07:00
Stanislav Malyshev
68e8326e0e Merge branch 'PHP-5.5'
* PHP-5.5:
  non living code related typo fixes
2013-08-04 16:07:13 -07:00
Stanislav Malyshev
c793a65690 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  non living code related typo fixes

Conflicts:
	Zend/zend_compile.c
2013-08-04 16:06:24 -07:00
Veres Lajos
8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
Rasmus Lerdorf
0fce1b4f72 Merge commit '5753b74'
* commit '5753b74':
  Make sure test.php isn't coming in from the include_path
2013-08-02 11:48:07 -04:00
Rasmus Lerdorf
a85e71e655 Merge commit '5753b74' into PHP-5.5
* commit '5753b74':
  Make sure test.php isn't coming in from the include_path
2013-08-02 11:47:52 -04:00
Rasmus Lerdorf
5753b74fab Make sure test.php isn't coming in from the include_path 2013-08-02 11:47:12 -04:00
Xinchen Hui
78673d1bad Merge branch 'PHP-5.5' 2013-08-02 18:39:58 +08:00
Xinchen Hui
1e942dde24 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-02 18:39:18 +08:00
Xinchen Hui
ce9169e360 Fixed bug Bug #65372 (Segfault in gc_zval_possible_root when return reference fails) 2013-08-02 18:37:15 +08:00
Xinchen Hui
25eb44fcc1 Merge branch 'PHP-5.5' 2013-07-21 16:20:00 +08:00
Xinchen Hui
629965abe2 Merge branch 'PHP-5.4' into PHP-5.5 2013-07-21 16:19:13 +08:00
Arpad Ray
b963249456 Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait
Also fix and test for get_defined_constants(true)
2013-07-20 11:05:13 +01:00
Arpad Ray
a015fa83a7 Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait 2013-07-19 19:19:48 +01:00
Veres Lajos
e9a95d78ef typo fixes 2013-07-15 00:23:03 -07:00
Veres Lajos
1b06e0be96 typo fixes 2013-07-15 00:19:49 -07:00
Veres Lajos
72085b0e5f typo fixes 2013-07-15 00:18:57 -07:00
Xinchen Hui
75808151e3 Merge branch 'PHP-5.5'
Conflicts:
	Zend/zend_vm_execute.h
2013-07-14 12:01:50 +08:00
Xinchen Hui
2c4f823437 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-07-14 11:53:56 +08:00
Xinchen Hui
ebad5178c4 Fixed bug #65254 (Exception not catchable when exception thrown in autoload with a namespace). 2013-07-14 11:47:06 +08:00
Nikita Popov
4d606cf01e Merge branch 'PHP-5.5' 2013-06-29 21:57:36 +02:00
Nikita Popov
0f36224beb Don't try to clean up generator stack on unclean shutdown
This fixes bugs #65035 and #65161. In one of the bugs the issue is
that function_state.arguments is NULL, but the arg count is pushed
to the stack and the code tries to free it. In the other bug the
stack of the generator is freed twice, once in generator_close and
later during shutdown.

It's rather hard (if at all possible) to do a proper stack cleanup
on an unclean shutdown, so I'm just disabling it in this case.
2013-06-29 21:51:54 +02:00
Xinchen Hui
83673eaf1d Merge branch 'PHP-5.5' 2013-06-24 23:53:54 +08:00
Xinchen Hui
a6a3aa5d49 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_API.c
2013-06-24 23:49:30 +08:00
Xinchen Hui
9cf3e65391 Fixed bug (is_callable() triggers Fatal Error)
This bug is also exists in 5.4, and previous fix by dsp is not complete
for __callStatic stituation, see test script
2013-06-24 23:45:08 +08:00
Nikita Popov
42729c1baf Merge branch 'PHP-5.5' 2013-06-17 23:49:08 +02:00
Nikita Popov
86434be946 Fix bug #65051: count() off by one inside unset()
nNumOfElements was incremented after the pDestructor code, so any
code in the dtor would get a wrong number of elements.

Right now the bucket deletion code is replicated in four places,
it should probably be moved off into one function (or rather,
zend_hash_apply_deleter should be used everywhere). The codes are
subtly different though in that the HANDLE_UNBLOCK_INTERRUPTIONS()
happens in different places. In particular it seems odd that in
some cases interruptions stay blocked during the destructor call.
2013-06-17 23:44:13 +02:00
Stanislav Malyshev
8ac131503d Merge branch 'PHP-5.5'
* PHP-5.5:
  Merge branch 'pull-request/341'
  Merge branch 'pull-request/341'
2013-06-10 14:31:57 -07:00
Stanislav Malyshev
4427d1dcfd Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev
02e4d7a290 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev
ac40c0b562 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:20:18 -07:00
Xinchen Hui
1689a7fe98 Merge branch 'PHP-5.5' 2013-06-10 21:33:47 +08:00
Xinchen Hui
a9d005c04e Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_compile.c
2013-06-10 21:31:25 +08:00
Xinchen Hui
d8792d87cf Fixed bug #64988 (Class loading order affects E_STRICT warning) 2013-06-10 21:26:11 +08:00
Dmitry Stogov
56c9a2f4f6 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed test script
2013-06-10 12:56:33 +04:00
Dmitry Stogov
ef20fdb338 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed test script
2013-06-10 12:55:51 +04:00
Dmitry Stogov
f68b8a5e74 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed test script
2013-06-10 12:54:54 +04:00
Dmitry Stogov
f5f6404260 Fixed test script 2013-06-10 12:53:19 +04:00
Xinchen Hui
4600578830 Merge branch 'PHP-5.5' 2013-06-09 13:50:06 +08:00
Xinchen Hui
f372e00332 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_def.h
2013-06-09 13:49:26 +08:00
Xinchen Hui
ab22fda7e5 Merge branch 'PHP-5.3' into PHP-5.4 2013-06-09 13:35:45 +08:00
Xinchen Hui
e8f004d542 Fixed bug #64966 (segfault in zend_do_fcall_common_helper_SPEC) 2013-06-09 13:20:40 +08:00
Xinchen Hui
ecfc3599a7 Merge branch 'PHP-5.5' 2013-06-05 17:32:09 +08:00
Xinchen Hui
e89537f2a3 Merge branch 'PHP-5.4' into PHP-5.5 2013-06-05 17:30:09 +08:00