Nikita Popov
f57c0b3249
Merge branch 'PHP-7.0'
2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c
Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
...
Also re bug #71575 .
2016-03-03 16:50:01 +01:00
Xinchen Hui
c58ad955a9
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71443 (Segfault using built-in webserver with intl using symfony)
Fix memory leak with not freeing OpenSSL errors
check for NULL and avoid crashes
Update libmagic.patch for PHP-5.6
Fixed bug #7143 (finfo throws notice for specific python file)
2016-01-26 15:57:49 +08:00
Xinchen Hui
9ff08ae17c
Fixed bug #71443 (Segfault using built-in webserver with intl using symfony)
2016-01-26 15:57:39 +08:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Anatol Belski
b8515125c8
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Revert "Partially fix bug #71129 "
2015-12-21 12:10:49 +01:00
Anatol Belski
53bfb6618d
Revert "Partially fix bug #71129 "
...
This reverts commit 4c55669caa
.
The way it is fixes doesn't satisfy every SAPI, so a better solution
is yet to work out.
2015-12-21 12:09:24 +01:00
Anatol Belski
6f4286f303
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Partially fix bug #71129
Typo
Bug #71105 was fixed in 7.0.1 (commit 9374ba35
)
2015-12-20 15:27:13 +01:00
Anatol Belski
4c55669caa
Partially fix bug #71129
2015-12-20 15:25:11 +01:00
Xinchen Hui
860764114f
Merge branch 'PHP-7.0'
2015-12-18 21:52:15 -08:00
Xinchen Hui
a21b0942fa
Fixed bug #71165 (-DGC_BENCH=1 doesn't work on PHP7)
2015-12-18 21:52:05 -08:00
Xinchen Hui
3ed5e54a19
Remove unused IS_TYPE_SYMBOLTABLE
2015-12-16 12:11:55 +08:00
Xinchen Hui
c2de445f79
Also protects this one
2015-11-12 14:51:19 +08:00
Xinchen Hui
53c03115cf
Re-fixed #70895
2015-11-12 14:35:34 +08:00
Rasmus Lerdorf
fb2c890c2c
zend.assertions is not a boolean
2015-10-06 17:13:38 +09:00
Bob Weinand
4a174ca7e6
Fixed bug #70532 (respect set_exception_handler in phpdbg)
2015-09-23 17:53:29 +02:00
Xinchen Hui
7680194a93
Fixed bug #70481 (Memory leak in auto_global_copy_ctor() in ZTS build)
2015-09-18 17:27:39 +08:00
Xinchen Hui
4ddeeb49a5
Remove free_string_zval
2015-09-11 10:58:24 +08:00
Joe Watkins
85a511d2c1
fix zend signal and tsrm compat
2015-09-01 09:34:54 +01:00
Dmitry Stogov
71af54e5f6
Mark error and exception functions as "cold" (Matt's idea)
2015-08-19 14:40:56 +03:00
Anatol Belski
7be9e69eaf
remove useless ifdefs
...
the most outer block already tell's it's ZTS code
2015-07-31 19:09:36 +02:00
Anatol Belski
b604716fb6
Fixed bug #70108 sometimes empty $_SERVER['QUERY_STRING']
...
auto_globals_jit is the reason every thread needs a copy. Otherwise
every thread will operate on the master values which can't end good.
2015-07-31 13:32:39 +02:00
Dmitry Stogov
549e8c4959
Squashed commit of the following:
...
commit 03cf871f1576f08b2348c141b209894a7bf17a86
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:31 2015 +0300
Revert "Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)"
This reverts commit 5ee8413259
.
commit 285a68227ce3d380e821a24fa389aa5239bd3fe1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:26 2015 +0300
Revert "Tuned off dubugging of live ranges"
This reverts commit 404dc93d35
.
commit 93d9d11157301ee2ec99afb6f5744b126d17f637
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:17 2015 +0300
Revert "Remove loop_var_stack"
This reverts commit b3a4c05071
.
commit ede68ebbc284aec79e3f719f2c8dbf9da6907752
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:12 2015 +0300
Revert "ZEND_SEPARATE reuses temporaries"
This reverts commit 1852f538b9
.
commit 96d8995dc1f517fb01b481736273767509f76c47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:10 2015 +0300
Revert "Add assertion in liveliness computation"
This reverts commit ed14019e8c
.
commit 0649d7bfef152e6cc8e67b922534e9946c634d9c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:07 2015 +0300
Revert "Fixed invalid live-range detection"
This reverts commit 54f367ee2a
.
commit dfe8f3851f6b04595eb089323e3492115a59363e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:04 2015 +0300
Revert "Add test guaranteeing that loop vars are only freed after potential return type exceptions"
This reverts commit f5db5a558d
.
commit 52a94aad6f48a199358cc07f7e4f56bb73050504
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:01 2015 +0300
Revert "Fixed exception habdling on "return" statement."
This reverts commit 17c5315bdf
.
commit 6e90ad7331901711e89c2ceb2bcab5023e5cee60
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:58 2015 +0300
Revert "Fix too early terminated temporary range with break/cont/goto"
This reverts commit cc876c04b4
.
commit 7b766e44b1970e4031f75109c302c07ead2c05cb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:55 2015 +0300
Revert "Fixed exception catching on break/continue"
This reverts commit 8c3f701eeb
.
2015-07-10 03:31:52 +03:00
Aaron Piotrowski
a1a83bf5f0
Switch code on thrown TypeError and ParseError to 0, update related tests
2015-07-07 16:54:39 -05:00
Nikita Popov
b3a4c05071
Remove loop_var_stack
...
Instead add a loop_var member to brk_cont_element. Now that
brk_cont is compile-time the distinction is no longer necessary.
Also drops brk_cont.start, check the loop_var op_type instead.
2015-07-07 20:55:12 +02:00
Aaron Piotrowski
29c3cd4448
Allow NULL for exception_ce
2015-07-07 12:10:55 -05:00
Aaron Piotrowski
1a0ddf988c
Switch code on thrown Errors to 0, update related tests
2015-07-03 17:53:42 -05:00
Aaron Piotrowski
22c38b2ef5
Remove need to pass error level
2015-07-03 17:53:41 -05:00
Aaron Piotrowski
5a99c07ecc
Enable throwing custom exceptions from errors
2015-07-03 17:53:40 -05:00
Aaron Piotrowski
ed1b64877d
Switch position of ce in exception ce variable names
2015-07-03 09:45:03 -05:00
Aaron Piotrowski
f9e9d3a437
Cleanup exception ce API
...
Removed recently added functions to get Error ce's and marked the old functions
fetching default_exception_ce and error_exception_ce as deprecated.
2015-07-03 09:44:30 -05:00
Dmitry Stogov
7aa7627172
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 13:59:27 +03:00
Aaron Piotrowski
110e0a5a2c
Merge branch 'master' into throwable-interface
...
# Conflicts:
# Zend/zend_language_scanner.c
# Zend/zend_language_scanner.l
# ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Anatol Belski
e76cf8432d
fix windows version constants initialization with nts
2015-05-29 11:47:58 +02:00
Aaron Piotrowski
d042d08807
Remodel exceptions based on Throwable interface
...
Added Throwable interface that exceptions must
implement in order to be thrown. BaseException
was removed, EngineException renamed to
Error, and TypeException and ParseException
renamed to TypeError and ParseError. Exception
and Error no longer extend a common base
class, rather they both implement the Throwable
interface.
2015-05-16 15:30:59 -05:00
Nikita Popov
0381c1b79e
Fixed bug #69388
...
Renamed compiler_context to oparray_context. Introduced per-file
file_context. Moved import tables into the file_context.
context_stack no longer exists, instead keeping backups of contexts
on C stack. Same for file contexts.
TODO: Move more things out of CG into file_context. There should be
a number of other things that we should not try to reuse in nested
compilations.
2015-04-20 18:18:52 +02:00
Nikita Popov
aef96d5169
Partially enable leak reports for objects
...
Cycle leaks are currently not reported, because this needs further
work.
The last GC run has been moved to run earlier (before the object
store free), so that array cycles that hold references to objects
don't show up as leaks. Fingers crossed that this doesn't adversely
affect anything else.
2015-04-18 17:31:11 +02:00
Nikita Popov
dc764bf644
Use object apply count in var_dump / print_r
...
Instead of using the array apply count on the debug_info array, use
the object apply count for recursion detection when dumping. This
handles recursion in a more generic way and does not require each
debug_info handler to deal with this.
This allows returning a temporary debug_info array, instead of
having to store it in the object (thus delaying destruction of the
values).
Switch SPL debug_info handlers to use a temporary array.
2015-04-15 22:00:12 +02:00
Dmitry Stogov
5e8133f453
Squashed commit of the following:
...
commit 2399fc84c5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 12:38:08 2015 +0300
Removed useless assignment
commit 796b633817
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 12:35:31 2015 +0300
Fixed execution with overriden zend_execute_ex()
commit 4a9fb125aa
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 02:02:58 2015 +0300
Fixed executor without global registers
commit d456c30e00
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 01:30:35 2015 +0300
Restored original behavior for tests/classes/__call_004.phpt
commit 479646d37f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 00:32:17 2015 +0300
Fixed test. We don't keep stack frame for fake function anymore.
commit 9ae61e33e2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 00:30:09 2015 +0300
Use ZEND_ACC_CALL_VIA_TRAMPOLINE instead of ZEND_ACC_CALL_VIA_HANDLER. Keep ZEND_ACC_CALL_VIA_HANDLER for compatibility.
commit 0a8403a2a0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 00:05:43 2015 +0300
Rename PROXY_CALL into CALL_TRAMPLINE.
Generalize API to allow reuse EG(trampline) for other purposes.
commit 4ea0525c10
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 23:22:25 2015 +0300
Reuse EG(proxy_call_op) for all proxy. Move proxy related functions from zend_objects_API to zend_object_handlers.
commit 529bf737ca
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 21:42:23 2015 +0300
Accurate use of proxy_call
commit 5d62837d5b
Merge: 83e749f
690843f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 19:40:00 2015 +0300
Merge branch 'master' into opcodefy-call
* master:
Fixed GOTO executor
Fixed typo
Changed ArrayIterator implementation using zend_hash_iterator_... API. Allowed modification of itterated ArrayObject using the same behavior as proposed in `Fix "foreach" behavior`. Removed "Array was modified outside object and internal position is no longer valid" hack.
commit 83e749ff3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 19:39:10 2015 +0300
Improved ZEND_PROXY_CALL
commit 0c829afc53
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 15:14:49 2015 +0300
Reverted white-space changes
commit df65144488
Merge: 5fd2f97
97756d9
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 14:37:07 2015 +0300
Merge branch 'opcodefy-call' of github.com:laruence/php-src into opcodefy-call
* 'opcodefy-call' of github.com:laruence/php-src:
Ready for PR
Fixed static call
Improve performance by using prealloated op_arrray
Respect called_scope
Support internal magical __call/__callStatic
opcode-fy magical __callStatic
Opcode-fy magical __call
commit 97756d9190
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 19:07:59 2015 +0800
Ready for PR
commit 74f9930846
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 19:03:00 2015 +0800
Fixed static call
commit ec1d9eb592
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 18:23:17 2015 +0800
Improve performance by using prealloated op_arrray
commit df7fbbf949
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 15:10:02 2015 +0800
Respect called_scope
commit 769d1d59fb
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 12:19:23 2015 +0800
Support internal magical __call/__callStatic
commit a980fedd5b
Author: Xinchen Hui <laruence@gmail.com>
Date: Wed Apr 8 18:35:41 2015 +0800
opcode-fy magical __callStatic
commit 73855f7d53
Author: Xinchen Hui <laruence@gmail.com>
Date: Wed Apr 8 14:21:55 2015 +0800
Opcode-fy magical __call
2015-04-10 23:01:00 +03:00
Xinchen Hui
5fd2f975ee
Unnecessary UNDEF
2015-04-09 14:16:04 +08:00
Nikita Popov
122d759618
Always throw TypeException on throwing zpp failures
...
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.
Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.
Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Ferenc Kovacs
a978a5eb49
fix build
2015-04-05 22:45:58 +02:00
Anatol Belski
92324b2719
fix nts windows_version_info and reorganize
2015-04-05 19:46:38 +02:00
Anatol Belski
f51a9c71dd
initialize EG(windows_version_info)
...
there are more places refering to this, but seems it was never
initialized
2015-04-04 20:28:58 +02:00
Nikita Popov
a8bf1c5d8f
Throw ParseException from lexer
...
Primarily to avoid getting fatal errors from token_get_all().
Implemented using a magic E_ERROR token, which the lexer emits to
force a parser failure.
2015-04-02 16:31:17 +02:00
Dmitry Stogov
e8672deefc
Convert "Unsupported operands" fatal error into EngineException (exceptions can't be thrown at compile-time yet, so unsuported operands in constant expressions are still lead to fatal error).
2015-03-31 13:25:26 +03:00
Anthony Ferrara
7044f9c6df
Refactor as to not use call info, but add the flag to the op_array.
2015-03-19 13:30:11 -04:00
Anthony Ferrara
0529eeb4a6
Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages
2015-03-18 15:22:21 -04:00
Anthony Ferrara
7feebead1b
Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function
2015-03-18 12:23:09 -04:00