1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Commit Graph

805 Commits

Author SHA1 Message Date
Dmitry Stogov
5574562f8f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Revert "More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074)."
2018-03-13 11:03:57 +03:00
Dmitry Stogov
0643c7ab4d Revert "More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074)."
This reverts commit 44ba557de5.
2018-03-13 11:03:45 +03:00
Dmitry Stogov
575f5002c0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074).
2018-03-13 10:45:53 +03:00
Dmitry Stogov
44ba557de5 More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074). 2018-03-13 10:44:53 +03:00
Bob Weinand
cfd0979be5 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-10 15:21:16 +01:00
Bob Weinand
9c6df8a238 Fix bug #76074 (opcache corrupts variable in for-loop) 2018-03-10 15:20:45 +01:00
Nikita Popov
500632ac13 Fix pfsockopen() func info 2018-02-18 17:42:12 +01:00
Nikita Popov
c0abab5fca Fix ZEND_SL range inference
This is a bit tricker than right shifts because shifting in the
sign bit flips the sign. The computed bounds are not tight.
2018-02-18 17:42:12 +01:00
Nikita Popov
202989edf8 Fix ZEND_SR range inference
Handle out-of-range RHS correctly.
2018-02-18 17:42:12 +01:00
Nikita Popov
40ff001381 Fix constant() func info
Since PHP 5.6 this can also be an array.
2018-02-18 17:42:11 +01:00
Nikita Popov
ae837db8cf Handle overloaded GMP operators in type inference 2018-02-18 15:33:30 +01:00
Nikita Popov
39974dd65d Disable negative range inference
The negative range inference implementation does not work correctly,
and it's not clear right now how it can be fixed. As such, disable
it entirely for now.
2018-02-18 15:33:28 +01:00
Nikita Popov
846e8a3ec9 Fix COUNT range inference
count() on objects may return a negative number :(
2018-02-17 23:18:30 +01:00
Nikita Popov
fa7c23ba27 Fix hash_init() and hash_copy() func info
These functions were switched to use objects instead of resources.
2018-02-17 23:18:29 +01:00
Nikita Popov
acb9426a6b Fix curl_multi_close() func info
Returns false on failure
2018-02-17 23:18:29 +01:00
Nikita Popov
8bdf9905da Fix get_object_vars() func info
Numeric keys will be converted to integer nowadays.
2018-02-17 23:18:29 +01:00
Nikita Popov
1a50a50bcf Add RC flags in init_func_return_info 2018-02-17 23:18:29 +01:00
Nikita Popov
fd5644cd0b Fix array_values() and array_keys() func info
Can return RCN for empty/packed arrays
2018-02-17 23:18:28 +01:00
Nikita Popov
0674d677bc Merge branch 'PHP-7.1' into PHP-7.2 2018-02-16 20:30:49 +01:00
Nikita Popov
372bf8a923 Fixed bug #75969
Move NOP stripping out of zend_optimize_block: NOP stripping may
move instructions, which may invalidate a Tsource shared across
an extended basic block.
2018-02-16 20:30:03 +01:00
Nikita Popov
7aac61ce76 Fixed bug #75938
New modulus range inference implementation has been verified using
https://gist.github.com/nikic/67947ff92cf0e1f7e931f2f0d4cf817f.

The computed bounds are not tight, but it seems to be very hard to
compute tight bounds on modulus operations.
2018-02-09 15:10:23 +01:00
Nikita Popov
1391a0fa0b Fixed bug #75893
It is not sufficient to just add the additional types for aliased
variables at the end of type inference, because types of derived
variables may depend on them. Make sure the additional types are
always added whenever the type of an aliased variable is updated.
2018-02-05 21:41:44 +01:00
Nikita Popov
d9e71169e6 Fixed bug #75729
Don't try to evaluate substr() and strpos() at compile-time if
mbstring function overloading is enabled. I'm reusing the
COMPILE_NO_BUILTIN_STRLEN for the detection of mbstring function
overloading here, even if it's technically only about strlen()...
2018-02-05 21:08:18 +01:00
Nikita Popov
f208187773 Backport narrowing fix to 7.1
This is a cherry-pick of 8a4532319d.
2018-01-09 18:41:46 +01:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Xinchen Hui
a3b5b93ba9 Updated NEWS 2017-12-17 09:42:01 +08:00
Nikita Popov
ee45104dba Fixed bug #75698 2017-12-16 22:04:18 +01:00
Nikita Popov
8a4532319d Improve fix for bug #75687
Adding an (incorrect) UNDEF here may cause subsequent narrowing in
other places.

Instead, let's try to handle this edge-case once for all
instructions...
2017-12-16 21:11:40 +01:00
Xinchen Hui
a20c9bd3fe Fixed bug #75687 (var 8 (TMP) has array key type but not value type) 2017-12-16 23:59:10 +08:00
Dmitry Stogov
3503dc7482 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75608 ("Narrowing occurred during type inference" error)
2017-12-04 17:22:28 +03:00
Dmitry Stogov
5934bff913 Fixed bug #75608 ("Narrowing occurred during type inference" error) 2017-12-04 17:22:06 +03:00
Dmitry Stogov
a4b2ae69e9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug in type inference
2017-11-27 10:16:46 +03:00
Dmitry Stogov
776bef8447 Fixed bug in type inference 2017-11-27 10:16:16 +03:00
Xinchen Hui
9d02227243 Improved fix 2017-11-27 12:03:37 +08:00
Xinchen Hui
c412b8b384 Fixed bug #75556 (Invalid opcode 138/1/1) 2017-11-25 00:54:15 +08:00
Dmitry Stogov
2a6a1fd22c typo 2017-11-22 16:30:57 +03:00
Dmitry Stogov
b6294bbc6c Fixed assertion on phpMyAdmin-4.7.5 home page 2017-11-08 12:51:53 +03:00
Joe Watkins
c3ee17065b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix wrong check of definition_phi->constraint.range.max_ssa_var
2017-11-03 17:49:52 +00:00
MITSUNARI Shigeo
21dbd2ffcd fix wrong check of definition_phi->constraint.range.max_ssa_var 2017-11-03 17:49:42 +00:00
Xinchen Hui
db4eb54149 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use abbrev
2017-10-30 18:17:41 +08:00
Xinchen Hui
d9de0f8683 Use abbrev 2017-10-30 16:26:59 +08:00
Dmitry Stogov
49256dcf6f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed type inference
2017-10-30 10:44:12 +03:00
Dmitry Stogov
230e505fd8 Fixed type inference 2017-10-30 10:41:27 +03:00
Xinchen Hui
e53a9aaa4a Fixed bug (assertion fails with extended info generated) 2017-10-17 19:47:29 +08:00
Xinchen Hui
8e147f12b9 Fixed bug (Phi sources removel) 2017-10-16 15:01:06 +08:00
Xinchen Hui
abbdbc21b0 Fixed bug #75357 (segfault loading WordPress wp-admin) 2017-10-14 23:12:29 +08:00
Xinchen Hui
e4f7ff9c0f Fixed bug #75370 (Webserver hangs on valid PHP text) 2017-10-13 18:18:10 +08:00
Xinchen Hui
e50cc4d3af Fixed typo 2017-10-13 17:35:02 +08:00
Dmitry Stogov
2929110ce1 Fixed cleanup after optimization passes 2017-10-10 19:25:51 +03:00