1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Commit Graph

867 Commits

Author SHA1 Message Date
Xinchen Hui dd47b3b963 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed another segfault with file_cache_only now
  Fixed bugs #71317 and #71504
  add test for bug #68957
  update NEWS
  update NEWS
  Fixed #54648 PDO::MSSQL forces format of datetime fields
  remove unneeded free parts
  fix leaks and add one more NULL check
  add NULL check
  fix C89 compat
  fix arg type
  fix nmake clean in phpize mode
2016-03-01 10:51:36 +08:00
Xinchen Hui 9fc0517328 Fixed another segfault with file_cache_only now 2016-03-01 10:50:56 +08:00
Nikita Popov a1c48d5e3a Various SSA-related tweaks
* Add FETCH_LIST to inference
* Restrict JMP_SET/COALESCE result type
* Fix typos in range inference
* Add const annotations in zend_ssa.h
* For pi statements dump the associated predecessor block
* If type can be both true and false, dump bool instead
2016-02-28 21:38:34 +01:00
Anatol Belski ff1f178d84 Merge branch 'PHP-7.0'
* PHP-7.0:
  test fixes
2016-02-28 11:53:55 +01:00
Anatol Belski f738abab85 test fixes 2016-02-28 11:53:21 +01:00
Xinchen Hui 3ab86e18cc Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed segfault with file_cache_only
2016-02-28 11:50:28 +08:00
Xinchen Hui 8c053d44e4 Fixed segfault with file_cache_only 2016-02-28 11:50:06 +08:00
Nikita Popov 9a45e920aa Support dropping rc1/rcn from dumps
For non-JIT we're not interested in rc inference.
2016-02-27 15:36:04 +01:00
Nikita Popov 8d758e7be9 Fix dominator tree construction
The used dominator intersection algorithm assumes a postorder
numbering of the CFG. The reversal of our natural numbering is
quite similar to postorder, but not the same.

In the future we should precompute both preorder/postorder
numberings and orderings, as these are useful in many places.
2016-02-27 15:10:18 +01:00
Dmitry Stogov b8e30a492a Use more general optimisation patterns 2016-02-26 21:02:41 +03:00
Dmitry Stogov 2517835c64 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed possible crash at PCRE on MSHUTDOWN
2016-02-24 23:47:05 +03:00
Dmitry Stogov 6842a3674d Fixed possible crash at PCRE on MSHUTDOWN 2016-02-24 23:46:11 +03:00
Dmitry Stogov 1a46917740 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed more synchronisation issues during SHM reload
2016-02-24 21:16:35 +03:00
Dmitry Stogov 43366f8ba8 Fixed more synchronisation issues during SHM reload 2016-02-24 21:15:53 +03:00
Dmitry Stogov 791b8f0c89 Merge branch 'PHP-7.0'
* PHP-7.0:
  Set proper type flags (REFCOUNTED and COPYABLE) according to interned or regular string
2016-02-18 23:18:56 +03:00
Dmitry Stogov 796e1629b0 Set proper type flags (REFCOUNTED and COPYABLE) according to interned or regular string 2016-02-18 23:15:38 +03:00
Dmitry Stogov bbea2ae048 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed process synchronisation problem, that may cause crashes after opcache restart
2016-02-17 13:59:20 +03:00
Dmitry Stogov d228752939 Fixed process synchronisation problem, that may cause crashes after opcache restart 2016-02-17 13:58:05 +03:00
Dmitry Stogov d0b9ef27c5 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed possible memory leak
2016-02-15 16:40:21 +03:00
Dmitry Stogov 388ab976b5 Fixed possible memory leak 2016-02-15 16:40:05 +03:00
Xinchen Hui ab5869400b Fixed another assertion fails due to live_range cleaned (ext/phar/tests/003a.phpt) 2016-02-15 14:38:20 +08:00
Xinchen Hui 49399359c6 Restore to the first version fix(sorry, mis-read the codes) 2016-02-15 13:47:52 +08:00
Xinchen Hui b3f5f5f1be Reset op_array->live_range if it is removed all by optimization 2016-02-15 12:09:52 +08:00
Xinchen Hui ab3a820aa3 Revert "Fixed segfault in file cache serialize if live range is empty after"
This reverts commit 2661a47479.
2016-02-15 12:09:13 +08:00
Xinchen Hui 2661a47479 Fixed segfault in file cache serialize if live range is empty after
optimiaztion
2016-02-15 12:07:43 +08:00
Xinchen Hui be91106db7 Merge branch 'PHP-7.0'
* PHP-7.0:
  Update NEWS: "Fixed bug  #71584 (Possible use-after-free of ZCG(cwd) in Zend Opcache)"
  Fix use-after-free of ZCG(cwd) in Zend Optimizer
2016-02-15 10:33:18 +08:00
Xinchen Hui 8974e4c781 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update NEWS: "Fixed bug  #71584 (Possible use-after-free of ZCG(cwd) in Zend Opcache)"
  Fix use-after-free of ZCG(cwd) in Zend Optimizer

Conflicts:
	ext/opcache/ZendAccelerator.c
2016-02-15 10:32:50 +08:00
Nikita Popov 44ed1cb5c0 Remove ZEND_CALL_CTOR_RESULT_UNUSED
Instead emit a FREE on the result of NEW.
2016-02-11 22:15:11 +01:00
Dmitry Stogov 8c2d55962e Combine conditions 2016-02-11 23:11:19 +03:00
Nikita Popov 5faedf5b3e Remove EXT_TYPE_UNUSED in favor of IS_UNUSED
This means we no longer allocate an unused VAR for the retval of
instructions that support unused results.

Nearly all instructions already used the result variable only if
it was used. The only exception to this was the return value
variable for internal function call results. I've adjusted the code
to use a stack zval for the unused return case now. As we have
retval specialization now, we know that it doesn't matter.
2016-02-11 18:02:19 +01:00
Yussuf Khalil 35f6f9b0db Fix use-after-free of ZCG(cwd) in Zend Optimizer 2016-02-10 10:33:57 +01:00
Nikita Popov 7174af4074 Support CFG construction without live range splitting
We must not split at live range boundaries for SSA constructions,
otherwise an OP_DATA instruction may be separated into new block
and not picked up during renaming.

It's also unnecessary for this use case and only blows up the CFG.
2016-02-09 13:02:33 +01:00
Dmitry Stogov 4095d5f245 Cleanup OP_DATA usage. Now only first operand of OP_DATA is used for ASSIGN_DIM, ASSIGN_OBJ and ASSIGN_OP (DIM/OBJ) instructions. 2016-02-09 13:12:57 +03:00
Dmitry Stogov f4bec6e137 After DFA pass result of FE_FETCH may be CV 2016-02-09 12:16:17 +03:00
Dmitry Stogov 1544fec94b Removed wrong (old) code 2016-02-08 12:20:37 +03:00
Nikita Popov 80c15ac784 Move pi placement into separate function
Non-functional change, just moving code. This makes it easier to
change the order of operations.
2016-02-02 17:39:59 +01:00
Nikita Popov 1c709f08c7 Merge branch 'PHP-7.0' 2016-01-29 17:03:32 +01:00
Guillaume Outters d01566fe2f opcache config.m4: Use = for comparison
HAVE_OPCACHE_FILE_CACHE and HAVE_HUGE_CODE_PAGES where not
correctly set on old systems (e.g. FreeBSD 8), due to a PHPism in
config.m4.  Using the standard shell operator = instead of == makes
the configure script produce the correct output.
2016-01-29 17:02:21 +01:00
Xinchen Hui 7b32ec1671 Merge branch 'PHP-7.0'
* PHP-7.0:
  Added test for bug #71443
2016-01-26 15:59:32 +08:00
Xinchen Hui bdbb32158c Added test for bug #71443 2016-01-26 15:59:18 +08: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 63fb2b7118 Improve the names 2016-01-25 16:00:10 +08:00
Nikita Popov 319e82838a Remove dead code
OP_DATA isn't used in that way anymore
2016-01-24 23:04:15 +01:00
Nikita Popov c2fea2a46d Respect RC_INFERENCE during DFG construction
To avoid inserting phis that are only relevant with rc inference
enabled. Suprisingly, this affects only 0.8% of phis.
2016-01-24 23:04:06 +01:00
Nikita Popov 949aaea66e Don't insert duplicate predecessors
Otherwise we'll get corrupt phis
2016-01-24 23:03:57 +01:00
Nikita Popov cf6aa46dbd Fix SSA for ZEND_YIELD
Yield-by-ref defs a ref var, yield-by-var only defs an rc1/rcn var
if rc inference is used.

Also move BIND_LEXICAL where it belongs in DFG construction.
2016-01-24 23:03:50 +01:00
Xinchen Hui d74cc3afcf Fixed Bug #71435 (Reproducible crash using opcache.file_cache_only=1 and class constant) 2016-01-24 03:56:47 -08:00
Dmitry Stogov 9b854ebab4 More accurate handling of isset() and unset() 2016-01-22 13:32:20 +03:00
Dmitry Stogov 79071fe227 Added optimization constraint (don't optimize result of NEW, because constructor may throw exception) 2016-01-22 13:30:34 +03:00