Commit Graph

1630 Commits

Author SHA1 Message Date
Nikita Popov
e24c24c108 Fix bug #68162: isset($$varname) always true 2014-10-06 20:39:00 +02:00
Nikita Popov
2a0c4edfda Drop convert_to usage in zend_exceptions
To make everything work correctly with refs.

I'm unsure whether the GET_PROPERTY_SILENT distinction is really
necessary, because the choice seemed pretty random, but kept it
around.
2014-10-06 20:14:30 +02:00
Nikita Popov
390900cbcb Fix isset/unset on by-ref names as well 2014-10-06 18:56:23 +02:00
Nikita Popov
03c726d728 Fix bug #68163 2014-10-06 18:45:08 +02:00
Timm Friebe
43f3d250f4 Add tests verifying calls work inside echo, concatenation and array access 2014-10-06 06:08:02 +08:00
Tjerk Meesters
82523c0752 Merge branch 'pr/647'
* pr/647: (33 commits)
  zend_uint -> uint32_t
  Fix nesting for *non*-compile-time-resolveable functions See a1a4ba9511 (commitcomment-7414223)
  Add tests for calls to nested, *non*-compile-time-resolveable functions See a1a4ba9511 (commitcomment-7414362)
  Make list of opcodes used for nesting calculation consistent   with `zend_do_convert_call_user_func()` in Zend/zend_compile.c
  Rewrite code to use ZEND_VM_JMP() instead of repeated ZEND_VM_INC_OPCODE() calls
  QA: Simplify code to find matching ZEND_DO_FCALL_BY_NAME CG(context).nested_calls is stored inside the initializer's result.num and inside the finalizer's op2.num, by comparing these we don't need to count manually, and are thus safer from future expansion with specialized opcodes e.g.
  Fix expected fatal error, now is catchable fatal
  Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master
  Check for memory leaks when not using return value
  Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master
  Add tests with arrays as parameters
  Handle ZEND_NEW nesting
  Also verify nesting with dynamically called static methods
  Handle ZEND_INIT_NS_FCALL_BY_NAME nesting
  QA: Refactor: Split tests a bit to make them more comprehendable
  Support nested static calls
  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%)
  Add support for PHP's 'extended information for debugger/profiler' mode
  Verify non-CV-operands also work See discussion https://github.com/php/php-src/pull/647#issuecomment-48050551
  Only allocate NULL return value if it's actually used
  ...

Conflicts:
	ext/date/tests/bug67118.phpt
2014-10-06 05:52:43 +08:00
Nikita Popov
58f389772f Fix $this CV init for include/eval
Fixes bug #68148
2014-10-05 23:38:59 +02:00
Dmitry Stogov
7c7b9184b1 Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed). 2014-10-05 13:02:58 +04:00
Nikita Popov
f1e21c4979 Fix test gc_029_zts.phpt
In ZTS the default properties are duplicated (instead of copied),
so the array has one lower RC than on NTS and as such gets destroyed
during GC, increasing the cycle count by 3. PHP 5.6 didn't always
copy default properties on ZTS, which is where the difference comes
from.
2014-10-04 00:37:15 +02:00
Nikita Popov
b68886f7b5 Mark test for full GC root buffer as XFAIL 2014-10-03 22:02:02 +02:00
Nikita Popov
443374675e Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_object_handlers.c
2014-10-03 21:30:06 +02:00
Nikita Popov
8617f2fa8d Merge branch 'PHP-5.5' into PHP-5.6 2014-10-03 21:27:07 +02:00
Nikita Popov
93288d0095 Fix bug #68188 2014-10-03 21:26:39 +02:00
Timm Friebe
e14b7f629b Fix segmentation fault in debug_backtrace() 2014-09-28 20:58:55 +02:00
Timm Friebe
e83580c1f0 Merge branch 'master' into catchable-fatals/methods-on-non-objects 2014-09-25 19:45:05 +02:00
Nikita Popov
1664e70ade Test use($this) being an error 2014-09-24 12:06:19 +02:00
Nikita Popov
9070eb38e9 Fix detection of write to built-in function for references 2014-09-23 20:42:22 +02:00
Nikita Popov
231dcc94e8 Test use of string names with \ prefix
And drop piece of dead code
2014-09-23 20:36:00 +02:00
Nikita Popov
75533c9b23 Test a few more error conditions in the compiler 2014-09-23 00:57:00 +02:00
Nikita Popov
51119054ff Test error conditions for ct class const refs
And fix a bug found while doing so...
2014-09-23 00:40:17 +02:00
Nikita Popov
c0c431b702 Test some additional cases for constexpr evaluation 2014-09-23 00:31:38 +02:00
Nikita Popov
f30f28ec47 Fix list() destructuring to special variables 2014-09-22 18:34:40 +02:00
Andrea Faulds
12b15e5ca4 Merge branch 'master' into integer_semantics 2014-09-21 00:29:48 +01:00
Nikita Popov
6219a4e844 Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_compile.c
2014-09-20 21:58:06 +02:00
Nikita Popov
308c0a727e Merge branch 'PHP-5.5' into PHP-5.6 2014-09-20 21:47:59 +02:00
Nikita Popov
5e977e69e1 Fixed bug #67633 2014-09-20 21:46:25 +02:00
Andrea Faulds
7f51d73bb2 Merge branch 'master' into integer_semantics 2014-09-17 20:15:32 +01:00
krakjoe
6967f78cc9 Merge branch 'pull-request/808' 2014-09-16 15:40:31 +01:00
Andrea Faulds
db72160e5a Merge branch 'master' into integer_semantics
Conflicts:
	Zend/zend_operators.h
2014-09-16 13:45:06 +01:00
Xinchen Hui
ae41536c4d Add test script for the segfault in gc while run phpspec 2014-09-15 14:49:34 +08:00
Tjerk Meesters
b192ff155d Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed #67985 - Incorrect last used array index copied to new array after unset

Conflicts:
	Zend/zend_variables.c
2014-09-09 19:32:09 +08:00
Tjerk Meesters
7e9daf60c1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed #67985 - Incorrect last used array index copied to new array after unset
2014-09-09 18:03:10 +08:00
Tjerk Meesters
aca474fa14 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed #67985 - Incorrect last used array index copied to new array after unset
2014-09-09 18:00:49 +08:00
Tjerk Meesters
99f0760bfb Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
2014-09-09 17:58:45 +08:00
Tjerk Meesters
47ac4612e9 Added test case to complement commit 29397f8 2014-09-06 18:57:03 +08:00
Levi Morrison
b476eca826 Error on multiple default blocks in a switch
Part of RFC: https://wiki.php.net/rfc/switch.default.multiple
2014-09-05 16:07:07 -06:00
Nuno Lopes
51ce4bd87c add a few more patterns to .gitignore 2014-08-31 15:19:14 +01:00
Nikita Popov
c59292570c Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_compile.c
2014-08-30 20:45:10 +02:00
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