php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8846 gmdate() causes crash. Using Apache + Win2K
Submitted: 2001-01-22 19:25 UTC Modified: 2001-03-13 06:12 UTC
From: syed at shianews dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.2 OS: Win2000 Professional
Private report: No CVE-ID: None
 [2001-01-22 19:25 UTC] syed at shianews dot com
hi,
This bug is reproduceable after the releases of 4.0.2 and above. It works fine with 4.0.1pl1

Following are the functions that causes crash (I get access violation).
$lday = gmdate('l', gmmktime(0,0,0,$month,$day,$year));
$lmonth = gmdate('F', gmmktime(0,0,0,$month,$day,$year));

Where $day, $month & $year are e.g. 10, 2, 2000

As i am running Win2K, and i have Dr.Watson installed. It actually logs the errors in a file. Below is the complete error log that Win2K made.

Application exception occurred:
        App:  (pid=1592)
        When: 1/23/2001 @ 00:03:06.221
        Exception number: c0000005 (access violation)

*----> System Information <----*
        Computer Name: DAARIUS
        User Name: SYSTEM
        Number of Processors: 1
        Processor Type: x86 Family 6 Model 8 Stepping 6
        Windows 2000 Version: 5.0
        Current Build: 2195
        Service Pack: 1
        Current Type: Uniprocessor Free
        Registered Organization: 
        Registered Owner: Daarius

*----> Task List <----*
   0 Idle.exe
   8 System.exe
 176 SMSS.exe
 200 csrss.exe
 220 WINLOGON.exe
 248 services.exe
 260 LSASS.exe
 428 svchost.exe
 456 SPOOLSV.exe
 508 msdtc.exe
 608 Apache.exe
 624 Ati2evxx.exe
 640 svchost.exe
 672 Apache.exe
 884 mysqld-sharewar.exe
 936 regsvc.exe
 952 mstask.exe
 976 tcpsvcs.exe
1012 snmp.exe
1052 stisvc.exe
1088 WinMgmt.exe
1104 mqsvc.exe
1324 explorer.exe
1432 atiptaxx.exe
1456 SynTPLpr.exe
1412 SynTPEnh.exe
1472 prpcui.exe
1476 DIRECTCD.exe
1492 internat.exe
1504 OSA.exe
1664 IEXPLORE.exe
1716 mdm.exe
1640 EditPad.exe
1592 php.exe
1668 DRWTSN32.exe
   0 _Total.exe

(00400000 - 00405000) 
(77F80000 - 77FFA000) 
(10000000 - 100F9000) 
(77E80000 - 77F35000) 
(77E10000 - 77E74000) 
(77F40000 - 77F7C000) 
(75050000 - 75058000) 
(75030000 - 75044000) 
(78000000 - 78046000) 
(77DB0000 - 77E0A000) 
(77D40000 - 77DB0000) 
(75020000 - 75028000) 
(77A50000 - 77B45000) 
(779B0000 - 77A45000) 
(1F7D0000 - 1F804000) 
(76B30000 - 76B6E000) 
(70BD0000 - 70C1C000) 
(71700000 - 7178A000) 
(69800000 - 69A42000) 
(780A0000 - 780B2000) 
(1F8C0000 - 1F8D6000) 
(78280000 - 7828C000) 
(77980000 - 779A4000) 
(777E0000 - 777E8000) 
(77950000 - 77979000) 
(777F0000 - 777F5000) 
(77830000 - 7783E000) 
(74FD0000 - 74FED000) 
(77340000 - 77353000) 
(77520000 - 77525000) 
(77320000 - 77337000) 
(75150000 - 7515F000) 
(75170000 - 751BF000) 
(77BE0000 - 77BEF000) 
(751C0000 - 751C6000) 
(773B0000 - 773DE000) 
(77380000 - 773A2000) 
(77880000 - 7790D000) 
(77C10000 - 77C6D000) 
(774E0000 - 77512000) 
(774C0000 - 774D1000) 
(77530000 - 77552000) 
(77360000 - 77379000) 
(691D0000 - 69255000) 
(75010000 - 75017000) 

State Dump for Thread Id 0x258

eax=00000000 ebx=0012f54c ecx=00000009 edx=005138f0 esi=00000000 edi=0012f54c
eip=10005ca6 esp=0012f504 ebp=00ad8b38 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246


function: php_gmtime_r
        10005c87 57               push    edi
        10005c88 50               push    eax
        10005c89 e8223f0800       call    tsrm_mutex_lock (10089bb0)
        10005c8e 8b4c2414         mov     ecx,[esp+0x14]         ss:00bacadb=????????
        10005c92 51               push    ecx
        10005c93 ff1514c20b10                                    ds:100bc214=7802a3b5
                             call dword ptr [zend_ptr_stack_clean+0x10914 (100bc214)]
        10005c99 8b5c241c         mov     ebx,[esp+0x1c]         ss:00bacadb=????????
        10005c9d b909000000       mov     ecx,0x9
        10005ca2 8bf0             mov     esi,eax
        10005ca4 8bfb             mov     edi,ebx
FAULT ->10005ca6 f3a5            rep  movsd ds:00000000=???????? es:0012f54c=00000004
        10005ca8 8b1518c30e10                                    ds:100ec318=005138f0
                                  mov     edx,[php_ini_path+0x48 (100ec318)]
        10005cae 52               push    edx
        10005caf e81c3f0800       call    tsrm_mutex_unlock (10089bd0)
        10005cb4 83c40c           add     esp,0xc
        10005cb7 8bc3             mov     eax,ebx
        10005cb9 5f               pop     edi
        10005cba 5e               pop     esi
        10005cbb 5b               pop     ebx
        10005cbc c3               ret
        10005cbd 90               nop
        10005cbe 90               nop


(Please could you fix this as soon as possible, as it is holding my whole development. I am using include_once() in my new system, and i cant use any other new version after 4.0.1pl1 which i am using at the moment. cos of this bug.)

Thank you so much.
regards,
Ali...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-25 17:45 UTC] dbeu@php.net
gmdate() crashes if -1 is given as timestamp (gmmktime() is returning -1 if an error occured)


 [2001-02-17 17:55 UTC] sbergmann@php.net
This snippet

  <?php
    echo gmdate ("M d Y H:i:s", -1);
  ?>

still crashes on Win32. Could some kind soul please look into this issue?
 [2001-03-13 06:12 UTC] dbeu@php.net
fixed in cvs
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC