Bug #76307 [Opn->Fbk]: strftime format %Z crash php

From: Date: Mon, 07 May 2018 12:27:20 +0000
Subject: Bug #76307 [Opn->Fbk]: strftime format %Z crash php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215144@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 Updated by: ab@php.net Reported by: drop_box at live dot de Summary: strftime format %Z crash php -Status: Open +Status: Feedback 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: Thanks for the further info. The backtrace is mising some info due to the absence of the debug package, I guess. I can't reproduce the crash locally, however the backtrace looks familiar to that in bug #64359. It might be still the same bug in the CRT. Maybe yet some factors are relevant to reproduce the bug. Anyway, one more try could be done. I'd ask you to fetch the debug symbols and retry with the backtrace. Alternatively you could share the crash dump somewhere. Thanks. Previous Comments: ------------------------------------------------------------------------ [2018-05-06 18:33:02] drop_box at live dot de Since i got not mutch experience in this area to do backtrace and you guide look a little bit outdated, i'm not sure if i do all right. But this looks for me as the best result: ntdll!RtlReportCriticalFailure+88 ntdll!RtlpReportHeapFailure+2f ntdll!RtlpLogHeapFailure+41 ntdll!RtlFreeHeap+48251 ucrtbase!_free_base+1b ucrtbase!__crt_unique_heap_ptr<char,__crt_internal_free_policy>::~__crt_unique_heap_ptr<char,__crt_internal_free_policy>+c ucrtbase!strftime+1a php7ts!php_strftime+1fc php7ts!xmlParserInputRead+841f php7ts!execute_internal+25 ------------------------------------------------------------------------ [2018-05-06 17:38:39] requinix@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2018-05-06 17:29:05] drop_box at live dot de Description: ------------ Since Windows 10 1803 php crash the apache service (httpd.exe), when setlocal is called in the "wrong" order and then strftime is called with %Z format on all other formats like %z the "crash" doesn't happen. Wrong order: setlocale(LC_TIME,'en_US.UTF-8'); setlocale(LC_CTYPE,'en_US.UTF-8'); strftime('%Z'); Right order: setlocale(LC_CTYPE,'en_US.UTF-8'); setlocale(LC_TIME,'en_US.UTF-8'); strftime('%Z'); Error is notice in alle php 7+ version (5.6 doesn't had this issue) tested version: 5.6.35 (no issue here) ,7.0.29, 7.1.16, 7.2.4, 7.2.5 Test script: --------------- <?php $value = strftime('%Z'); echo $value.'%Z'; echo '<br>'; setlocale(LC_TIME,'en_US.UTF-8'); $value = strftime('%Z'); echo $value.'%Z'; echo '<br>'; setlocale(LC_CTYPE,'en_US.UTF-8'); // here came the crash in the next line $value = strftime('%Z'); echo $value.'%Z'; echo '<br>'; Expected result: ---------------- Result should be that it behavior in the same as when you run %z. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76307&edit=1

« previous php.bugs (#215144) next »