Commit graph

12767 commits

Author SHA1 Message Date
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
ebaba26d39 Merge branch 'PHP-7.1' 2016-09-25 12:39:33 +02: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
8c26762baf Merge branch 'PHP-7.1' 2016-09-24 22:46:43 +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
c1bc26c0e2 Merge branch 'PHP-7.1' 2016-09-24 18:22:43 +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
96305b456b Merge branch 'PHP-7.1' 2016-09-24 13:23:54 +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
Dmitry Stogov
ab1b32f81a Removed redundand code 2016-09-23 12:26:30 +03:00
Dmitry Stogov
42db69058a Removed impossible condition 2016-09-22 17:58:45 +03:00
John Boehr
68e602ff0a Fix bug #69579 2016-09-22 12:38:07 +02:00
Nikita Popov
328ecb486f Merge branch 'PHP-7.1' 2016-09-22 12:35:29 +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
6860ce3ce9 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed inconsistent meaning of zend_startup_module_ex() return value used in zend_hash_apply()
2016-09-20 12:35:14 +03: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
TAKEKOSHI Akishige
15735678c3 when needle is short, Sunday algorithm is slower than glibc memchr() 2016-09-18 15:46:40 +09: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
dd7affa9ff Merge branch 'PHP-7.1' 2016-09-16 21:06:52 +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
Dmitry Stogov
c7149b92d7 Micro-optimization 2016-09-13 17:10:30 +03: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
40f0184564 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #73067 (__debugInfo crashes when throwing an exception)
2016-09-13 10:59:41 +08: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
695176458f Merge branch 'PHP-7.1' 2016-09-11 22:46:48 +01: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
a499cfc9cc Merge branch 'PHP-7.1' 2016-09-09 15:47:04 +02:00
Nikita Popov
30af80610e Compile intval() etc to casts 2016-09-09 15:45:46 +02:00
Nikita Popov
53b3ef54d2 Merge branch 'PHP-7.1' 2016-09-09 15:31:54 +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
5fccf64956 Merge branch 'PHP-7.1' 2016-09-06 22:20:25 +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
fcc6f2df59 Merge branch 'PHP-7.1' 2016-09-06 14:15:05 +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
dec8c7e9d8 Merge branch 'PHP-7.1' 2016-09-06 12:20:20 +02:00