Commit Graph

12244 Commits

Author SHA1 Message Date
Nikita Popov
8bb3957270 Fixed bug #73303 2016-11-18 21:41:43 +01:00
Dmitry Stogov
74b3e809d9 Regenerated scanner 2016-11-18 16:19:46 +03:00
Dmitry Stogov
d769a020df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:18:22 +03:00
Dmitry Stogov
97b65cc9c2 Fixed memory leaks in parse_ini_file() 2016-11-18 16:17:52 +03:00
Dmitry Stogov
6a647150ee Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Disabled PHP call tracing by default (it makes significant overhead). This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
2016-11-18 13:21:22 +03:00
Dmitry Stogov
0c78fe4bb5 Disabled PHP call tracing by default (it makes significant overhead).
This may be enabled again using envirionment variable USE_ZEND_DTRACE=1.
2016-11-18 13:19:30 +03:00
Dmitry Stogov
a911df5d22 Revert "Introduced zend.enable_dtrace INI directive to enable/disable PHP call tracing"
This reverts commit 01239b0eff.
2016-11-18 12:52:46 +03:00
Dmitry Stogov
01239b0eff Introduced zend.enable_dtrace INI directive to enable/disable PHP call tracing 2016-11-18 12:23:10 +03:00
Stanislav Malyshev
3b78cabc88 More int->size_t and string overflow fixes 2016-11-05 14:00:47 -07:00
Stanislav Malyshev
f7f8aae33c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  More int->size_t and string overflow fixes
2016-11-05 13:59:35 -07:00
Stanislav Malyshev
669763d88a More int->size_t and string overflow fixes 2016-11-05 13:22:17 -07:00
Dmitry Stogov
bdc1ba3e3a Intriduced ZEND_ACC_INHERITED class flag.
It's going to be helpful for static optimisations, when "parent" is not known yet.
2016-11-01 22:56:25 +03:00
Christoph M. Becker
b281362681 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-01 20:29:11 +01:00
Christoph M. Becker
8957ff36b3 Merge branch 'PHP-5.6' into PHP-7.0 2016-11-01 20:24:10 +01:00
Christoph M. Becker
2eacb53fc4 Fix #73436: Setting allow_url_fopen to Off makes several tests fail
We make sure that these tests run with allow_url_fopen=1.
2016-11-01 20:13:53 +01:00
Nikita Popov
29bc6557c8 Optimize __get etc
Cheap 20% win by skipping the function name allocation if we don't
need it.
2016-10-29 14:38:34 +02:00
Dmitry Stogov
4616441980 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixded bug #72736 (Slow performance when fetching large dataset with mysqli / PDO)
2016-10-26 15:22:51 +03:00
Dmitry Stogov
3fb0a1a4e7 Fixded bug #72736 (Slow performance when fetching large dataset with mysqli / PDO) 2016-10-26 15:17:09 +03:00
Xinchen Hui
788368ff1c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73350 (Exception::__toString() cause circular references)
2016-10-22 14:50:42 +08:00
Xinchen Hui
eca84946a4 Fixed bug #73350 (Exception::__toString() cause circular references) 2016-10-22 14:50:21 +08:00
Dmitry Stogov
9ded1b4edb Introduced HT_IS_PACKED() and HT_IS_WITHOUT_HOLES() macros. (Benjamin Coutu) 2016-10-19 23:10:42 +03:00
Anatol Belski
671f647739 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73329 (Float)"Nano" == NAN
2016-10-18 19:14:14 +02:00
Anatol Belski
9f2ab75b10 Fixed bug #73329 (Float)"Nano" == NAN
The special cases (float)"inf", etc. were never intended and are
caused by the updated strtod lib. While it might be nice as an
easy way to produce Inf and NaN special values, it was never
documented and cause BC breaches.
2016-10-18 19:11:18 +02:00
Bob Weinand
58f3b9c0ef Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1 2016-10-18 14:31:49 +02:00
Bob Weinand
8b177f6a2a Fixed bug #73338 (Exception thrown from error handler may crash) 2016-10-18 14:14:24 +02:00
Dmitry Stogov
c31d66b3fd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73337 (try/catch not working with two exceptions inside a same operation)
  Revert "Fix bug #47890 #73215 uniqid() should use better random source"
  Update NEWS
2016-10-18 15:09:44 +03:00
Dmitry Stogov
7bd4e7208e Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #73337 (try/catch not working with two exceptions inside a same operation)
2016-10-18 15:04:49 +03:00
Dmitry Stogov
6558559bcc Fixed bug #73337 (try/catch not working with two exceptions inside a same operation) 2016-10-18 14:48:01 +03:00
Joe Watkins
6091873d4a Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
This reverts commit 2d8ab51576.
2016-10-17 14:22:55 +01:00
Christoph M. Becker
2cc3aeb4b9 Implement #72918: negative offset inside a quoted string leads to parse error
We allow negative numeric offsets for the simple syntax inside
double-quoted and heredoc strings.
2016-10-14 14:14:08 +02:00
Anatol Belski
d35d9d1d0e missed piece for renaming
(cherry picked from commit 5ba9eab436)
2016-10-14 02:08:28 +02:00
Anatol Belski
dd604015be rename publicly exposed symbol to avoid name conflicts
(cherry picked from commit 730288ae41)
2016-10-14 02:08:14 +02:00
Anatol Belski
ee42529750 Revert "export symbol missing by phpdbg"
This reverts commit 611ab7fe5b.

Overseen strpprintf is there

(cherry picked from commit 3104882cf8)
2016-10-14 02:01:08 +02:00
Stanislav Malyshev
0362d61ab7 Fix potential overflows in php_pcre_replace_impl
(cherry picked from commit 9c50ba42d6)
2016-10-14 01:57:55 +02:00
Anatol Belski
b4ddf4e575 fix another mistake
(cherry picked from commit bec0121733)
2016-10-14 01:56:31 +02:00
Nikita Popov
0e4c173349 Merge branch 'PHP-7.0' into PHP-7.1
(cherry picked from commit 26964ccea0)
2016-10-14 01:52:17 +02:00
Anatol Belski
4e338817d1 export symbol missing by phpdbg
(cherry picked from commit 611ab7fe5b)
2016-10-14 01:51:21 +02:00
Anatol Belski
2c38f70a94 fix wrong merge
(cherry picked from commit 821a230f29)
2016-10-14 01:49:39 +02:00
Anatol Belski
a8a11b669d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73190: memcpy negative parameter _bc_new_num_ex

(cherry picked from commit af1bf873fe)
2016-10-14 01:46:18 +02:00
Anatol Belski
a6715786a7 finish 7.1 port
(cherry picked from commit f1fff032fc)
2016-10-14 01:44:31 +02:00
Stanislav Malyshev
54003ab663 Fix bug #73147: Use After Free in PHP7 unserialize()
(cherry picked from commit 0e6fe3a4c9)
(cherry picked from commit f42cbd749c)
2016-10-14 01:44:16 +02:00
Xinchen Hui
c9274d20b7 Fixed bug #73288 (Segfault in __clone > Exception.toString > __get)
Actually this is caused by optimization(opcache)

(cherry picked from commit d19898b298)
2016-10-14 01:35:39 +02:00
Anatol Belski
5ba9eab436 missed piece for renaming 2016-10-13 15:39:02 +02:00
Anatol Belski
730288ae41 rename publicly exposed symbol to avoid name conflicts 2016-10-13 15:23:50 +02:00
Anatol Belski
3104882cf8 Revert "export symbol missing by phpdbg"
This reverts commit 611ab7fe5b.

Overseen strpprintf is there
2016-10-13 09:50:32 +02:00
Stanislav Malyshev
9c50ba42d6 Fix potential overflows in php_pcre_replace_impl 2016-10-12 23:07:47 -07:00
Nikita Popov
5b429fef42 Fix line number of implicit return in pseudo-main scope 2016-10-12 22:25:41 +02:00
Anatol Belski
611ab7fe5b export symbol missing by phpdbg 2016-10-12 22:18:41 +02:00
Stanislav Malyshev
74b5662536 Fix bug #73190: memcpy negative parameter _bc_new_num_ex
(cherry picked from commit 40e7baab3c)
2016-10-12 19:48:25 +02:00
Stanislav Malyshev
f42cbd749c Fix bug #73147: Use After Free in PHP7 unserialize()
(cherry picked from commit 0e6fe3a4c9)
2016-10-12 17:51:15 +02:00
Stanislav Malyshev
1bdb30a429 Merge branch 'PHP-7.0.12' into PHP-7.0
* PHP-7.0.12:
  set versions and release date
  sync NEWS
  Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
  Fix for #73240 - Write out of bounds at number_format
  Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
  set versions
  Fix bug #73091 - Unserializing DateInterval object may lead to __toString invocation
2016-10-11 16:46:51 -07:00
Stanislav Malyshev
689a9b8def Merge branch 'PHP-5.6.27' into PHP-5.6
* PHP-5.6.27:
  Fix tests
  fix tsrm
  Fix bug #73284 - heap overflow in php_ereg_replace function
  Fix bug #73276 - crash in openssl_random_pseudo_bytes function
  Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
  fix bug #73275 - crash in openssl_encrypt function
  Fix for #73240 - Write out of bounds at number_format
  Bug #73218: add mitigation for ICU int overflow
  Add more locale length checks, due to ICU bugs.
  Fix bug #73208 - another missing length check
  Fix bug #73190: memcpy negative parameter _bc_new_num_ex
  Fix bug #73189 - Memcpy negative size parameter php_resolve_path
  Fixed bug #73174 - heap overflow in php_pcre_replace_impl
  Fix bug #73150: missing NULL check in dom_document_save_html
  Fix bug #73147: Use After Free in PHP7 unserialize()
  Fix bug #73082
  Fix bug #73073 - CachingIterator null dereference when convert to string
2016-10-11 16:26:35 -07:00
Stanislav Malyshev
96a8cf8e1b Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML() 2016-10-11 13:30:52 -07:00
Anatol Belski
8c9f639a1d Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
This reverts commit 2d8ab51576.
2016-10-11 11:24:08 +02:00
Nikita Popov
f8a6df4706 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-08 17:00:56 +02:00
Nikita Popov
2a75f5026a Fix bug #66773, #66862
This a partial backport of 8754b19. It
a) fixes the class/function/constant import table confusion in the
   namespaced case, and
b) restricts conflict checks to a single file based on a filename
   pointer comparison.

It does not fix the issues with filename reuse (e.g. due to eval)
and late-bound classes. This part of the change requires globals
changes.
2016-10-08 17:00:27 +02:00
Stanislav Malyshev
40e7baab3c Fix bug #73190: memcpy negative parameter _bc_new_num_ex 2016-10-03 00:09:02 -07:00
Nikita Popov
f9d4b1a3f1 Fix leak in zend_exception_error
Only occurs if a non-fatal severity level is used, e.g. when using
interactive mode.
2016-10-01 19:04:31 +02:00
Nikita Popov
02ba9d71ab Unwrap reference returns in cufa etc 2016-09-30 22:10:01 +02:00
Xinchen Hui
b28277db94 Cleanup exception handling after zend_fetch_class_by_name 2016-09-30 16:00:14 +08:00
Xinchen Hui
f211614ba7 Use smart branch 2016-09-30 13:19:11 +08:00
Dmitry Stogov
53c0a04185 zval_dtor_func_for_ptr() -> zval_dtor_func() 2016-09-29 10:59:54 +03:00
Dmitry Stogov
8863ca76e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Better fix for bug #72854 (avoid extra copy and creating reference to stack variable)
2016-09-29 10:57:09 +03:00
Dmitry Stogov
e7f4355d9b Better fix for bug #72854 (avoid extra copy and creating reference to stack variable) 2016-09-29 10:56:01 +03:00
Nikita Popov
56a7646ab2 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-28 23:22:48 +02:00
Nikita Popov
e520b9e127 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-28 23:22:11 +02:00
Nikita Popov
1f5412982c Handle resource keys in constexpr arrays 2016-09-28 23:11:02 +02:00
Nikita Popov
40b8105cca Fix the constant array case as well 2016-09-28 23:05:21 +02:00
Nikita Popov
97066792b7 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-28 22:38:47 +02:00
Nikita Popov
437942d972 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-28 22:36:58 +02:00
Nikita Popov
99bf19c177 Check next_index_insert failure in ADD_ARRAY_ELEMENT 2016-09-28 22:35:27 +02:00
Nikita Popov
19f1ff5ad0 Combine code for keyed/unkeyed list() 2016-09-28 21:43:48 +02:00
Nikita Popov
6f9e5684a1 Fix segfault when empty entry in keyed array assignment 2016-09-28 21:43:48 +02:00
Anatol Belski
22a3d55e9a fix exports which are now referenced by phpdbg
(cherry picked from commit cd0f1c8a5e)
2016-09-28 21:29:53 +02:00
Nikita Popov
bf907b9961 Revert ReflectionType::__toString() behavior + deprecate 2016-09-28 19:21:51 +02:00
Bob Weinand
e5d75d7268 Add phpdbg generator command 2016-09-28 13:26:08 +02:00
Nikita Popov
21f0be4792 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-27 19:48:50 +02:00
Nikita Popov
b7cbaa7f43 Fix bug #73181 2016-09-27 19:47:48 +02:00
Anatol Belski
4e3746380a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73172 parse error: Invalid numeric literal
2016-09-26 18:49:40 +02:00
Anatol Belski
39e5991705 Fixed bug #73172 parse error: Invalid numeric literal 2016-09-26 18:47:30 +02:00
Dmitry Stogov
6be2e79c2c On PHP-7.1 and above we have to check CALL_INFO instead of symbol_table. 2016-09-26 16:16:07 +03:00
Dmitry Stogov
bca7f02933 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73156 (segfault on undefined function)
2016-09-26 14:17:27 +03:00
Dmitry Stogov
d279118422 Fixed bug #73156 (segfault on undefined function) 2016-09-26 14:14:57 +03:00
Stanislav Malyshev
0e6fe3a4c9 Fix bug #73147: Use After Free in PHP7 unserialize() 2016-09-25 19:53:59 -07:00
Nikita Popov
bd893061d6 Use SEND_USER for CONST|TMP as well
Otherwise we're missing the "expected to be a reference, value
given" warning that appears for ordinary calls to call_user_func().

Also update an UPGRADING note with recent changes wrt
call_user_func().
2016-09-25 12:39:23 +02:00
Nikita Popov
c7651c2396 Fix a couple of ASSIGN_DIM/OBJ inference bugs
Account for possible null return values better.
2016-09-24 22:43:27 +02:00
Christoph M. Becker
75a1384ebf Merge branch 'PHP-7.0' into PHP-7.1 2016-09-24 18:18:34 +02:00
Christoph M. Becker
bc22582cf7 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-24 18:05:21 +02:00
Christoph M. Becker
c596b02a5b Merge branch 'pull-request/2120' into PHP-5.6 2016-09-24 17:52:15 +02:00
Nikita Popov
453102b4a0 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-24 13:22:00 +02:00
Nikita Popov
8831a12da1 Fixed bug #73163 2016-09-24 13:18:43 +02:00
John Boehr
68e602ff0a Fix bug #69579 2016-09-22 12:38:07 +02:00
Nikita Popov
7cd2494bb8 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-22 12:34:55 +02:00
John Boehr
8e313becf4 Fix bug #69579 2016-09-22 12:32:37 +02:00
Dmitry Stogov
64a8048c53 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed inconsistent meaning of zend_startup_module_ex() return value used in zend_hash_apply()
2016-09-20 12:34:58 +03:00
Dmitry Stogov
3c16384ea2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed inconsistent meaning of zend_startup_module_ex() return value used in zend_hash_apply()
2016-09-20 12:34:40 +03:00
Dmitry Stogov
4dd70b6e2f Fixed inconsistent meaning of zend_startup_module_ex() return value used in zend_hash_apply() 2016-09-20 12:29:57 +03:00
TAKEKOSHI Akishige
2efb131210 when needle is short, Sunday algorithm is slower than glibc memchr() 2016-09-18 16:35:09 +08:00
Nikita Popov
896814e139 Make zval_ptr_dtor / _zval_dtor_func more robust
In particular, allow arrays with refcount>1, like we already allow
for all other types. _zval_dtor_func is now the same as
_zval_dtor_func_for_ptr with an extra refcount decrement check at
the start. At this point we might as well drop it...

Cherry-pick of ded69ee6e6 from
PHP-7.1.
2016-09-17 22:33:41 +02:00
Nikita Popov
cab7bc7e07 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-16 21:06:11 +02:00
Michael Orlitzky
0e76cafaf1 Disable add/sub asm for gcc 4.9 pic/pie builds 2016-09-16 21:06:02 +02:00
Anatol Belski
8fd0e0285f missed semicolon 2016-09-13 10:50:44 +02:00
Anatol Belski
363c2524dd fix C89 conformity 2016-09-13 10:43:51 +02:00
Stanislav Malyshev
6a7cc8ff85 Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction 2016-09-12 21:04:23 -07:00
Stanislav Malyshev
19866fb76c Fix various int size overflows.
Add function for detection of string zvals with length that does not fit
INT_MAX.
2016-09-12 21:04:23 -07:00
Xinchen Hui
a339523fe5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73067 (__debugInfo crashes when throwing an exception)
2016-09-13 10:59:09 +08:00
Xinchen Hui
2d8ab51576 Fixed bug #73067 (__debugInfo crashes when throwing an exception) 2016-09-13 10:58:57 +08:00
Andrea Faulds
fc5497cb92 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-11 22:46:20 +01:00
Andrea Faulds
d690014bf3 Remove zpp fallback code (always use Fast ZPP)
Squashed commit of the following:

commit 3e27fbb3d2
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Sep 11 19:14:37 2016 +0100

    Keep dummy FAST_ZPP macro for compatibility

commit 8a7cfd00de
Author: Andrea Faulds <ajf@ajf.me>
Date:   Mon Sep 5 22:36:03 2016 +0100

    Remove FAST_ZPP macro and plain zpp fallback code
2016-09-11 22:44:46 +01:00
Nikita Popov
30af80610e Compile intval() etc to casts 2016-09-09 15:45:46 +02:00
Nikita Popov
b4213f0d0b Add fast paths for bitwise operators 2016-09-09 15:30:41 +02:00
Christoph M. Becker
5880428dac Fix potential memory issue with USE_ZEND_ALLOC=0
The PHP core and extensions are written with the assumption that memory
allocation either succeeds, or the allocator bails out (i.e. the allocator
is infallible). Therefore the result of emalloc() and friends are not checked
for NULL values.

However, with USE_ZEND_ALLOC=0, malloc() and friends are used as allocators,
but these are fallible, i.e. they return NULL instead of bailing out if they
fail. This easily leads to invalid memory accesses in the following, such as
in <https://bugs.php.net/73032>. Some of these cases may constitute
exploitable vulnerabilities.

Therefore we make the infallible __zend_alloc() and friends the default for
USE_ZEND_ALLOC=0.
2016-09-07 22:50:53 +02:00
Nikita Popov
135f275836 Add ISSET_ISEMPTY_STATIC_PROP to smart branch list 2016-09-06 22:19:34 +02:00
Christoph M. Becker
68d3501381 Merge branch 'pull-request/2115' into PHP-7.1 2016-09-06 14:14:23 +02:00
Christoph M. Becker
5d394b3bb4 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-06 12:16:42 +02:00
Christoph M. Becker
af3031d755 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-06 12:11:24 +02:00
Christoph M. Becker
dad793630d Fix #73025: Heap Buffer Overflow in virtual_popen of zend_virtual_cwd.c
`command_length` is retrieved via strlen() and later passed to emalloc()
and memcpy(), so the appropriate type is `size_t`.

We don't add a regression test, because that would need to allocate a string
of at least 2 GiB.
2016-09-06 12:05:58 +02:00
Christoph M. Becker
727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Anatol Belski
0382a64fdf remove unused assignment 2016-09-01 23:45:31 +02:00
Anatol Belski
ac82a34185 rewrite the getcwd part
Also fixes a possible memory leak. Still not ideal, as seems CWD
longer than MAX_PATH is still not supported. But a heap allocation
is not needed anyway, as MAXPATHLEN value is the maximum supported.
2016-09-01 23:45:31 +02:00
Anatol Belski
0a50cbabf6 fix unused assignment 2016-09-01 23:45:31 +02:00
Davey Shafik
12ee17d5e0 Implement \ArgumentCountError exception 2016-08-30 19:35:56 -07:00
Dmitry Stogov
b5bab0fce8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72944 (Null pointer deref in zval_delref_p).
2016-08-29 12:07:54 +03:00
Dmitry Stogov
b66039db33 Fixed bug #72944 (Null pointer deref in zval_delref_p). 2016-08-29 12:02:50 +03:00
Xinchen Hui
01701912c7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72936 (Zend API's zend_symtable_str_update() asserts key should end with '\0')
2016-08-29 00:10:57 +08:00
Xinchen Hui
986d0f87ec Fixed bug #72936 (Zend API's zend_symtable_str_update() asserts key should end with '\0') 2016-08-29 00:10:31 +08:00
Anatol Belski
d58202853d fix leak 2016-08-27 22:24:24 +02:00
Xinchen Hui
557f1ccf0c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72943 (assign_dim on string doesn't reset hval)

Conflicts:
	Zend/zend_execute.c
2016-08-26 18:32:54 +08:00
Xinchen Hui
c67fa3c91d Fixed bug #72943 (assign_dim on string doesn't reset hval) 2016-08-26 18:30:08 +08:00
Xinchen Hui
38f7d595c0 Remove redundant \t 2016-08-25 13:29:22 +08:00
Dmitry Stogov
62ab40bc96 Added tests and NEWS entry
Fixed bug #72598 (Reference is lost after array_slice())
2016-08-23 12:14:31 +03:00
Nikita Popov
906456c410 call_user_func(_array): Don't abort on reference warning
Change zend_call_function() to not abort the call if a non-reference
is passed to a reference argument. The usual warning will still be
thrown, but the call will proceed as usual.
2016-08-23 10:29:15 +03:00
Xinchen Hui
e849e65d89 This is unecessary for 7.1 (IS_ERROR is an internal type) 2016-08-21 17:40:10 +08:00
Xinchen Hui
e572035ecf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug  #72911 (Memleak in zend_binary_assign_op_obj_helper)
  Fixed bug #72907 (null pointer deref, segfault in gc_remove_zval_from_buffer (zend_gc.c:260))
2016-08-21 17:39:52 +08:00
Xinchen Hui
0476bb1de5 Fixed bug #72911 (Memleak in zend_binary_assign_op_obj_helper) 2016-08-21 17:38:03 +08:00
Xinchen Hui
b740bb3987 Fixed bug #72907 (null pointer deref, segfault in gc_remove_zval_from_buffer (zend_gc.c:260)) 2016-08-21 17:10:10 +08:00
Aaron Piotrowski
08c5d77027 Revert "Fix closure tests using ReflectionType::__toString()"
This reverts commit 6fcedc96fb.
2016-08-20 23:26:01 -05:00
Kalle Sommer Nielsen
447e57a1e1 Fixed 7.1 build, decls first please! 2016-08-17 20:26:32 +02:00
Kalle Sommer Nielsen
8a1fbdda43 Fixed C89 build 2016-08-17 13:43:50 +02:00
Xinchen Hui
ce6ad9bdd9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: (48 commits)
  Update NEWs
  Unused label
  Fixed bug #72853 (stream_set_blocking doesn't work)
  fix test
  Bug #72663 - part 3
  Bug #72663 - part 2
  Bug #72663 - part 1
  Update NEWS
  BLock test with memory leak
  fix tests
  Fix TSRM build
  Fix bug #72850 - integer overflow in uuencode
  Fixed bug #72849 - integer overflow in urlencode
  Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
  Fix bug #72838 - 	Integer overflow lead to heap corruption in sql_regcase
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72836 - integer overflow in base64_decode caused heap corruption
  Fix for bug #72807 - do not produce strings with negative length
  Fix for bug #72790 and bug #72799
  Fix bug #72730 - imagegammacorrect allows arbitrary write access
  ...

Conflicts:
	ext/standard/var_unserializer.c
2016-08-17 17:14:30 +08:00
Stanislav Malyshev
75d7666968 Merge branch 'PHP-7.0.10' into PHP-7.0
* PHP-7.0.10:
  Fix bug #72749: wddx_deserialize allows illegal memory access
  Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
  fix tests
  Fix bug#72697 - select_colors write out-of-bounds
  Fix bug #72708 - php_snmp_parse_oid integer overflow in memory allocation
  Fix bug #72730 - imagegammacorrect allows arbitrary write access
  Fix bug #72750: wddx_deserialize null dereference
  Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
  fix tests
  add missing skipif section
  Fix for bug #72790 and bug #72799
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72742 - memory allocator fails to realloc small block to large one
  Use size_t for path length
  Check for string overflow
  Fix for bug #72782: mcrypt accepts only ints, so don't pass anything else
  Fix bug #72674 - check both curl_escape and curl_unescape
2016-08-16 23:52:22 -07:00
Stanislav Malyshev
f8a75d4eee Merge branch 'PHP-7.0' into PHP-7.0.10
* PHP-7.0: (34 commits)
  Fix URL rewriter partially
  Support "git worktree"
  Add NEWS
  Fix ASSERT logic
  Bugfix 72791: fix memory leak in PDO persistent connections
  Don't copy mime types in CLI server
  Remove obsolete Id tags
  Bump version in OCI8 test
  Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
  Remove typo'd commit
  Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
  Replace dead branch with ZEND_ASSERT()
  Add test for bug #69107: finfo no longer detects PHP files
  Fix bug #55451
  Fix stream_socket_enable_crypto() test
  Remove old $Id$ tags
  Sync with 7.1 branch changes from Nikita & Dimitri to keep OCI8 code identical
  Fix bug #72524 (Binding null values triggers ORA-24816 error)
  Fix the fix (Nikita), thanks!
  Check the return value of dbconvert() in mssql_guid_string(), as it may return -1 in case the conversion failed. In that case false is returned.
  ...

Conflicts:
	ext/standard/ftp_fopen_wrapper.c
2016-08-16 23:50:42 -07:00
Stanislav Malyshev
1cd6bc6463 Fix for bug #72807 - do not produce strings with negative length 2016-08-16 22:55:41 -07:00
Nikita Popov
7384fcff0a Merge branch 'PHP-7.0' into PHP-7.1 2016-08-16 21:05:57 +02:00
Nikita Popov
e2230c17d3 Fix bug #72854 2016-08-16 21:05:30 +02:00
Aaron Piotrowski
6fcedc96fb Fix closure tests using ReflectionType::__toString() 2016-08-16 13:05:51 -05:00
Nikita Popov
ba09a520d2 Cleanup parameter/return type checking code
a) Extract all the logic for error message formatting into a separate
function that is reused for everything.
b) Extract the logic for whether a value matches a type into two
functions, one for user types, one for internal ones.

This tries to fight the increasing code duplication in the type
checking code, whether everything was repeated at least four times
and parts of the error message handling were repeated in dozens of
branches.
2016-08-16 15:48:33 +02:00
Nikita Popov
1397f754c8 Fix handling of qualified nullable parameter types
compile_typename() can't deal with TYPE_NULLABLE flags, drop it
beforehand.
2016-08-16 12:43:17 +02:00
Dmitry Stogov
ff06588130 Fixed use after free 2016-08-16 11:44:22 +03:00
Stanislav Malyshev
c2a13ced42 Fix bug #72742 - memory allocator fails to realloc small block to large one 2016-08-14 19:08:59 -07:00