1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 20:53:00 +02:00
Commit Graph

555 Commits

Author SHA1 Message Date
Xinchen Hui
8250b3fca1 Fixed possible false assertion failure 2016-12-08 22:04:43 +08:00
Nikita Popov
60249f4390 Fix propagation of QM_ASSIGN into VERIFY_RETURN_TYPE
VERIFY_RETURN_TYPE uses different formats for the CONST/non-CONST
cases. If we progate a CONST operand into op1, op1 should be
moved to result.
2016-12-07 23:14:46 +01:00
Nikita Popov
76c4a3db08 Fix bug #73668
Not bothering to implement special handling to get an accurate
range for this case.
2016-12-06 22:25:35 +01:00
Nikita Popov
d7e7f74b24 Factor out common binary op code in range inference
Instead of repeating the same code for binary ops and their
compound assignment variants, factor the range computation out
into a separate function.
2016-12-06 22:09:44 +01:00
Nikita Popov
3b79f8f408 Fix bug #73654 2016-12-05 20:41:14 +01:00
Dmitry Stogov
54244ba565 Fixed access to uninitialized value 2016-12-01 13:25:50 +03:00
Xinchen Hui
a0b28434cc Fixed bug #73583 (Segfaults when conditionally declared class and function have the same name)
bug was introduced in rev 88eae43f , and the runtime defined key is not
merged-able
2016-11-23 14:24:46 +08:00
Nikita Popov
226b82b127 RC inference fixes 2016-11-17 13:47:36 +01:00
Dmitry Stogov
f8f35d0d4e VERIFY_RETURN_TYPE on references can't be eliminated 2016-11-17 10:41:42 +03:00
Dmitry Stogov
a04d9e0f1b Fixed type ingference 2016-11-16 20:49:00 +03:00
Nikita Popov
5f4f83220a Don't inline if function has ref arguments
Otherwise we end up leaving opcodes like FETCH_DIM_W behind. The
test case demonstrates a leak in particular.
2016-11-12 18:49:41 +01:00
Nikita Popov
3c8beb16c4 Allow early-binding of ZEND_NEW args 2016-11-10 22:52:15 +01:00
Nikita Popov
8106c01afc Fix block pass leaks 2016-11-10 22:28:32 +01:00
Nikita Popov
62af7e0db8 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-10 22:19:48 +01:00
Nikita Popov
bb3d0c0e17 Fcall optimization: Avoid FETCH_DIM_R with UNUSED op2 2016-11-10 21:36:46 +01:00
Nikita Popov
3048428cf0 Don't elide undef var notice 2016-11-10 14:58:54 +01:00
Nikita Popov
4f76073b6d Set result of FREE to unused in block pass 2016-11-10 14:55:52 +01:00
Nikita Popov
570e7fa331 Fix ext/xml func info 2016-11-10 14:55:50 +01:00
Nikita Popov
0378121c64 Range inference cleanup
Replace inline #ifdefs with some macros. Fix build if NEG_RANGE is
disabled. Fix some typos. Add some comments.
2016-11-10 14:55:40 +01:00
Dmitry Stogov
a5458e7e8e Fixed reference-counter inference 2016-11-01 19:04:10 +03:00
Dmitry Stogov
e88adddfd1 Fixed reference-counter inference 2016-11-01 00:18:12 +03:00
Dmitry Stogov
d3325ff771 typo 2016-10-31 21:39:34 +03:00
Dmitry Stogov
e696927e48 Fixed reference-counter inference 2016-10-31 19:51:19 +03:00
Dmitry Stogov
bdd3fec7f8 Fixed incorrec type usage 2016-10-25 22:12:34 +03:00
Dmitry Stogov
01bc515b4d Export zend_analyze_calls() to allow building call trees. 2016-10-25 17:20:27 +03:00
Nikita Popov
c3232c5903 Fix call graph construction
Travis build for 7.1+ has been failing for the past week...
2016-10-23 22:12:55 +02:00
Dmitry Stogov
565ce0d41d Fixed typo 2016-10-20 01:17:40 +03:00
Dmitry Stogov
ac6134fb64 Fixed type inference rules. 2016-10-18 12:39:33 +03:00
Dmitry Stogov
ed3196ea35 Use simple "one-pass" algorithm. 2016-10-18 00:06:20 +03:00
Nikita Popov
9f472ba5e3 Various function info fixes 2016-10-15 23:58:31 +02:00
Nikita Popov
659cc278e2 Various RC inference fixes 2016-10-15 23:58:29 +02:00
Dmitry Stogov
e92a18dcd5 Fixed referencecounter inference rules
(cherry picked from commit 6046a99b97)
2016-10-14 01:24:46 +02:00
Dmitry Stogov
233992409b Fixed referencecounter inference rules
(cherry picked from commit fae7d6b9bb)
2016-10-14 01:24:23 +02:00
Dmitry Stogov
3760bc5407 Removed deprecated flag 2016-10-10 11:48:29 +03:00
Dmitry Stogov
771600ee6b Fixed information about possible return value 2016-10-10 11:46:43 +03:00
Dmitry Stogov
b2d53e47ed Updated reference-counting inferece rules.
The previous rules refected PHP-5 behavior and were completely wrong for PHP-7. (e.g. scalars don't have reference counters at all).
This change shouldn't affect anything, because results of this inference are not used yet.
2016-10-06 11:08:01 +03:00
Dmitry Stogov
c218c4f01e Special handling for $php_errormsg and $http_response_header. 2016-09-30 02:41:08 +03: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
Nikita Popov
db801763e4 Add range inference for ZEND_STRLEN
On 32-bit systems we conservatively allow negative lengths.
On 64-bit systems, the range could additionally be restricted to
the canonical 48-bit size.
2016-09-24 22:43:27 +02:00
Dmitry Stogov
846441ab4b Prevent optimization of huge functions. 2016-09-16 14:03:05 +03:00
Xinchen Hui
a90e438af3 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Don't optimize (string) cast on arrays
2016-09-09 22:40:53 +08:00
Xinchen Hui
2a3b75a0eb Fixed function info 2016-09-09 22:40:08 +08:00
Nikita Popov
1d4b831d63 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-09 16:38:42 +02:00
Nikita Popov
e3c08de08a Don't optimize (string) cast on arrays
Otherwise we throw a notice during pass1_5 optimization.
2016-09-09 16:38:26 +02:00
Nikita Popov
766264f8d2 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-09 16:02:59 +02:00
Nikita Popov
bbcf77c309 Fix some block_pass bugs 2016-09-09 15:58:36 +02:00
Dmitry Stogov
6aa07c9083 Fixed type inference bug 2016-09-07 11:36:14 +03:00
Dmitry Stogov
94fbcbe172 Allow optional splitting of basic blocks at RECV/RECV_INIT opcodes. 2016-08-29 20:35:17 +03: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