php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45734 PHP segfaults in date_timezone_set for a timezone without ID
Submitted: 2008-08-06 14:44 UTC Modified: 2008-08-08 09:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alex at kiesel dot name Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alex at kiesel dot name
New email:
PHP Version: OS:

 

 [2008-08-06 14:44 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-06 14:48 UTC] 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-08 09:09 UTC] alex at kiesel dot name
Probably a duplicate of #45038.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 13:01:28 2025 UTC