Bug #76307 [Com]: strftime format %Z crash php

From: Date: Wed, 09 May 2018 13:27:03 +0000
Subject: Bug #76307 [Com]: strftime format %Z crash php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215179@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76307&edit=1 ID: 76307 Comment by: spam2 at rhsoft dot net Reported by: drop_box at live dot de Summary: strftime format %Z crash php Status: Open Type: Bug Package: Date/time related Operating System: Windows 10 1803 PHP Version: 7.2.5 Block user comment: N Private report: N New Comment: > because i don't understand what the meaning of "debug symbols" is https://en.wikipedia.org/wiki/Debug_symbol the debug symbols are what is responsible for outputs like below php7ts_debug.dll!zif_strftime(_zend_execute_data * execute_data, _zval_struct * return_value) line 1740 C php7ts_debug.dll!ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data * execute_data) line 617 C Previous Comments: ------------------------------------------------------------------------ [2018-05-09 13:17:41] drop_box at live dot de I also install in the meantime the update: KB4103721 but nothing changed in my eyes (as you see on my backtrace/crash report) ------------------------------------------------------------------------ [2018-05-09 13:15:45] drop_box at live dot de Well i use here the x86 ts version of php, on the other hand I try my best to compile my self a debug version, because i don't understand what the meaning of "debug symbols" is. Here the output of my 7.2.5 debug x86 ts version: php7ts_debug.dll!php_strftime(_zend_execute_data * execute_data, _zval_struct * return_value, int gmt) line 1707 C php7ts_debug.dll!zif_strftime(_zend_execute_data * execute_data, _zval_struct * return_value) line 1740 C php7ts_debug.dll!ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER(_zend_execute_data * execute_data) line 617 C php7ts_debug.dll!execute_ex(_zend_execute_data * ex) line 59723 C php7ts_debug.dll!zend_execute(_zend_op_array * op_array, _zval_struct * return_value) line 63760 C php7ts_debug.dll!zend_execute_scripts(int type, _zval_struct * retval, int file_count, ...) line 1496 C php7ts_debug.dll!php_execute_script(_zend_file_handle * primary_file) line 2590 C php.exe!do_cli(int argc, char * * argv) line 1011 C php.exe!main(int argc, char * * argv) line 1404 C ------------------------------------------------------------------------ [2018-05-09 07:08:01] ab@php.net Ohh, I've also overseen setlocale(). Besides them likely to be failing, they're not thread safe. There could be a race condition, as while one thread calls setlocale(), another one calls strftime(). But since the same does repro on CLI, it is most likely not the case. A good idea is probably to move such code to ICU. Still, there was issues with strftime alone in the past, when the receiving buffer was initially too small. If the CRT upgrade didn't help, i can provide a test build with an increased initial buffer, lets see. @drop_box, which exact PHP builds do you use? Thanks. ------------------------------------------------------------------------ [2018-05-08 20:04:02] requinix@php.net True, they won't work on Windows (should be "english_United States"), but fixing it doesn't repro for me. Today MS pushed out KB4103721 which "addresses additional issues with updated time zone information". https://support.microsoft.com/en-us/help/4103721 It brings ucrtbase.dll from version 10.0.17134.12 (at least that's what the Windows SDK has) to 10.0.17134.48. I hate to ask you to install an update as fresh as this but that changelog entry sounds suspiciously relevant. ------------------------------------------------------------------------ [2018-05-08 19:15:46] cmb@php.net I'm somewhat startled regarding the setlocale() calls, since these are supposed to fail due to wrong locales, aren't they? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=76307 -- Edit this bug report at https://bugs.php.net/bug.php?id=76307&edit=1

« previous php.bugs (#215179) next »