Commit Graph

7636 Commits

Author SHA1 Message Date
Danack
dbc0a80b23 Added test and possible fix for https://bugs.php.net/bug.php?id=67068 2015-01-31 23:13:55 -08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Kalle Sommer Nielsen
fbf3a6bc1a Fixed bug #68676 (Explicit Double Free) 2014-12-29 11:04:23 +01:00
Nikita Popov
aa394e70ff Fix bug #67111
Loop variables need to be freed for both "break" and "continue".

I'm adding the test to Zend/ because it's good to have a test for
this even without opcache.
2014-12-19 21:42:42 +01:00
Kévin Dunglas
ee226b961c Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor) 2014-12-12 14:58:23 +01:00
Anatol Belski
3affc0e8a2 Fixed bug #68583 Crash in timeout thread
This replaces the GUI element used for execution timeout handling
on Windows. Instead a timer queue technique is used, which is indeed
a thread pool. A timer queue timer is a lightweight object handled
but that thread pool and the timer thread spends most of the time
sleeping and waiting for an alert.

Please note also that this introduces neither binary nor source
breach. The custom timeout thread functions are deleted, however
they was not exported throug DLL, so couldn't be used by any
external code. As well they couldn't be used anywhere in the core
except in executor api, because those custom timeout thread
functions they used to operate on static variables which would
be overwritten (and that would blow).

So instead a relatively modern technique is used for the timeout
handling. It's still not perfect because the executor still has to
check EX(timed_out). This can be a topic for an improvement in
master. But brobably can be tricky as currently it seems to be not
possible to signal an individual thread. Also note another issue
that static variables aren't thread safe, but the current timer
implementation is.
2014-12-12 10:43:31 +01:00
Anatol Belski
65fce7f950 Fixed bug #55541 errors spawn MessageBox, which blocks test automation
With that, also fixed bug #68297 (Application Popup provides too few
information) as a better error message is provided to the event log.

In the second case, the condition for display_startup_error was removed. The
condition was added as a fix for bug #30760 which was preventing the
MessageBox to appear. When display_startup_error=on, the error will be seen
on the console. But when running under a webserver it'll probably get lost,
so we need to log it other way into the event log (would be done automatically
when message box was used, but that would eventually cause issues of blocked
execution).

Generally speaking - any MessageBox or other graphical element is a potential
issue and that was repeatedly reported. Graphical elements shouldn't be used
in the core. Even being a rare one it can cause a bad situation where the
server is blocked. Yet some places have to cleaned up.
2014-12-03 16:33:05 +01:00
Julien Pauli
7c77ca38b1 Fix #65419 - Inside trait, self::class != __CLASS__ 2014-11-28 13:24:25 +01:00
Stanislav Malyshev
9ef264504d Merge branch 'pull-request/840' into PHP-5.5
* pull-request/840:
  Update the VM generation script, per Bob.
  Update NEWS after rebase.
  Add BEGIN_EXTERN_C() and END_EXTERN_C() to .h files missing them.
2014-11-23 16:17:17 -08:00
Julien Pauli
cd3b46f28a Fix #68185 - Inconsistent insteadof definition 2014-11-21 15:37:33 +01:00
Anatol Belski
1504e9c9df fix incompatible pointer types 2014-11-17 09:33:37 +01:00
Xinchen Hui
7d69fa7179 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5 2014-11-10 13:52:07 +08:00
Xinchen Hui
ab84939254 Fixed bug #68370 ("unset($this)" can make the program crash) 2014-11-10 13:46:47 +08:00
Dmitry Stogov
ed4c0245c7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Partial fix for bug #68365 (zend_mm_heap corrupted after memory overflow in zend_hash_copy)
2014-11-07 09:48:26 +03:00
Dmitry Stogov
9dfa843a38 Partial fix for bug #68365 (zend_mm_heap corrupted after memory overflow in zend_hash_copy) 2014-11-07 09:46:49 +03:00
Adam Harvey
4bb836be20 Update the VM generation script, per Bob. 2014-10-31 10:10:49 -07:00
Adam Harvey
5b5f99ef18 Add BEGIN_EXTERN_C() and END_EXTERN_C() to .h files missing them. 2014-10-31 10:08:17 -07:00
Nikita Popov
93288d0095 Fix bug #68188 2014-10-03 21:26:39 +02:00
Nikita Popov
5e977e69e1 Fixed bug #67633 2014-09-20 21:46:25 +02:00
Tjerk Meesters
aca474fa14 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed #67985 - Incorrect last used array index copied to new array after unset
2014-09-09 18:00:49 +08:00
Tjerk Meesters
99f0760bfb Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
2014-09-09 17:58:45 +08:00
Stanislav Malyshev
4b9fcc01d4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  update NEWS
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)
2014-09-01 12:15:54 -07:00
Stanislav Malyshev
197095c29e Merge branch 'pull-request/770' into PHP-5.4
* pull-request/770:
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)
2014-09-01 12:11:42 -07:00
Keyur Govande
437612f656 Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) 2014-08-23 14:17:37 +00:00
Keyur Govande
5e338836ff Fix typo from commit 32314f6b6 2014-08-14 01:14:11 +00:00
Keyur Govande
32314f6b67 Fix destruction order in zend_shutdown (bug #65463, #66036)
If Apache or a similar SAPI receives a signal during PHP processing
it calls zend_shutdown() without calling shutdown_executor().
	#65463: If a module like Gearman or Memcached is loaded,
in the unfixed version it is unloaded by zend_destroy_modules() before the
CG(CLASS_TABLE) is destructed. When CG(CLASS_TABLE) is destructed,
any pointers to methods (specifically around destruction) in the unloaded
module's .so are now dangling and the process segfaults.
	#66036: Any subclasses of an internal class like ArrayObject need
to be destructed in order: subclass first and then the internal class. In the
unfixed version zend_shutdown() clears the CG(CLASS_TABLE) from the head
of the list onwards, so internal classes are destructed first and user-defined
classes last. Internal classes are alloc/deallocated with malloc/free while
user-defined classes with emalloc/efree. If there's shared data between them
then efree() could be called instead of free() leading to a seg-fault.
2014-08-14 00:55:14 +00:00
Xinchen Hui
8ff00e6e85 Improve fix for #66608 2014-07-19 17:19:01 +08:00
Xinchen Hui
9ce1a36af2 Fixed segfault with empty break 2014-07-19 15:30:50 +08:00
Xinchen Hui
f604b61e39 New added opcodes don't need to be resloved 2014-07-19 12:53:34 +08:00
Xinchen Hui
de433d4c47 Fixed bug #66608 (Incorrect behavior with nested "finally" blocks) 2014-07-18 15:45:31 +08:00
Stanislav Malyshev
c291033469 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Make sure the generator script also creates a newline at the end of file
  Add newline at end of file to prevent compilation warning
2014-07-06 22:15:35 -07:00
Lior Kaplan
716d2a3937 Make sure the generator script also creates a newline at the end of file
Similar to commit d6713f39 in master
2014-07-06 22:15:09 -07:00
Lior Kaplan
c5fec9e09d Add newline at end of file to prevent compilation warning
The newline was removed at commit 50d50c2f
2014-07-06 22:15:00 -07:00
Nikita Popov
d9ebd0f3d6 Fix bug #67497: eval with parse error causes segfault in generator 2014-07-02 17:33:31 +02:00
Bob Weinand
e93f8e74d4 Merge branch 'PHP-5.4' into PHP-5.5 2014-06-16 11:16:33 +02:00
Bob Weinand
0a3979e08b Fix patch for bug #67436 2014-06-16 11:10:50 +02:00
Bob Weinand
03ee0ddc5f Merge branch 'PHP-5.4' into PHP-5.5 2014-06-16 00:41:46 +02:00
Levi Morrison
6c9c44905e Added tests for bug 67436 2014-06-15 16:31:39 -06:00
Bob Weinand
f5f1c702cd Merge branch 'PHP-5.4' into PHP-5.5 2014-06-15 22:24:44 +02:00
Bob Weinand
ca29063da5 Fix bug #67436 2014-06-15 22:18:25 +02:00
Xinchen Hui
e8699d75da Remove unused included file 2014-06-10 21:56:30 +08:00
Levi Morrison
f47976dd9b Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.
2014-06-08 18:59:44 -07:00
Levi Morrison
e030efa4f6 Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-06-08 18:59:23 -07:00
Stanislav Malyshev
38343856e1 Merge branch 'PHp-5.4' into PHP-5.5
* PHp-5.4:
  Fixed identation on file
  Fix align indentation
2014-06-08 15:53:26 -07:00
Jefersson Nathan
e51eaaf665 Fix align indentation 2014-06-08 14:28:51 -07:00
Bob Weinand
5bc4eb714a Merge branch 'PHP-5.4' into PHP-5.5 2014-05-11 15:15:27 +02:00
Bob Weinand
5bf6a093ad Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245)
Linux apparently does not like memcpy in overlapping regions...
2014-05-11 15:11:03 +02:00
Anatol Belski
d963cf94a5 refixed the test related to bug #67072 2014-04-18 15:16:09 +02:00
Tjerk Meesters
5e988a888a Fixed test case for 5328d42 2014-04-17 17:36:03 -07:00
Ferenc Kovacs
561843c973 typo spotted by Lajos Veres 2014-02-27 11:29:08 +01:00