#45734 [Fbk->Csd]: PHP segfaults in date_timezone_set for a timezone without ID

[email protected] ("alex at kiesel dot name")
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               45734
 User updated by:  alex at kiesel dot name
 Reported By:      alex at kiesel dot name
-Status:           Feedback
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: Linux
 PHP Version:      5.2.6
 New Comment:

Probably a duplicate of #45038.


Previous Comments:
------------------------------------------------------------------------

[2008-08-06 14:54:02] [email protected]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi

------------------------------------------------------------------------

[2008-08-06 14:48:55] alex at kiesel dot name

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b9db3cf24f0 (LWP 16473)]
0x000000000048d5ba in timelib_tzinfo_clone ()
(gdb) bt
#0  0x000000000048d5ba in timelib_tzinfo_clone ()
#1  0x00000000004702bb in zif_date_timezone_set ()
#2  0x00000000005f0747 in ?? ()
#3  0x00000000005e05c3 in execute ()
#4  0x00000000005c130d in zend_execute_scripts ()
#5  0x000000000057f8f8 in php_execute_script ()
#6  0x00000000006443f5 in main ()

------------------------------------------------------------------------

[2008-08-06 14:44:55] alex at kiesel dot name

Description:
------------
PHP segfaults after issueing a WARNING.

Reproduce code:
---------------
<?php

  $date= date_create('2008-08-01 20:11:01+0200');
  date_timezone_set($date, date_timezone_get($date));

?>


Expected result:
----------------
Warning: date_timezone_set(): Can only do this for zones with ID for
now in /home/ak/timezone-segfault.php on line 4

Actual result:
--------------
Warning: date_timezone_set(): Can only do this for zones with ID for
now in /home/ak/timezone-segfault.php on line 4
Segmentation fault



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45734&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.