|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchestzset.patch (last revision 2012-09-27 14:30 UTC by remi)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-07-31 02:52 UTC] yohgaki@php.net
[2018-01-13 11:41 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2018-01-13 11:41 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
Description: ------------ As tzset functions is not async-signal-safe, nor safe to be longjmp'ed out, If a timeout occurs during soem glib call, with a lock set, the PHP script will hangs. tzset should not be called during timeout management. Attached patch solves this. Test script: --------------- <?php ini_set('max_execution_time', '1'); echo "Playing with env. and tzset"; $tabs = timezone_identifiers_list(); while (true) { foreach ($tabs as $tab) { putenv("TZ=$tab"); } echo "."; } Must be run various time to reproduce Expected result: ---------------- Script output "PHP Fatal error: Maximum execution time of 1 second exceeded in..." and exit. Actual result: -------------- Script hangs after "PHP Fatal error: Maximum execution time of 1 second exceeded in..."