php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37741 Segmentation fault on strtotime
Submitted: 2006-06-08 12:41 UTC Modified: 2006-06-20 01:00 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: rick at dualmedia dot it Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.4.2 OS: Linux ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rick at dualmedia dot it
New email:
PHP Version: OS:

 

 [2006-06-08 12:41 UTC] rick at dualmedia dot it
Description:
------------
On apache 2.0.55 i get:
[notice] child pid 25356 exit signal Segmentation fault (11)



Reproduce code:
---------------
$this->data_scadenza = '';		$tpl->setVariable('data',date("d/m/Y",(strtotime($this->data_scadenza))));

Actual result:
--------------
#0  0xa7ce50d0 in php_gd_lex (lvalp=0xafb1a1e8, parm=0xafb1a258)
    at /tmp/php4-4.4.2/ext/standard/parsedate.c:2327
2327          while (ISSPACE ((unsigned char) *date->yyInput))
(gdb) bt
#0  0xa7ce50d0 in php_gd_lex (lvalp=0xafb1a1e8, parm=0xafb1a258) at /tmp/php4-4.4.2/ext/standard/parsedate.c:2327
#1  0xa7ce5a37 in php_gd_parse (parm=0xafb1a258) at /tmp/php4-4.4.2/ext/standard/parsedate.c:1138
#2  0xa7ce61c1 in php_parse_date (p=0x8 <Address 0x8 out of bounds>, now=0x0) at /tmp/php4-4.4.2/ext/standard/parsedate.c:2452
#3  0xa7cc5a15 in zif_strtotime (ht=1, return_value=0x875acac, this_ptr=0x0, return_value_used=1) at /tmp/php4-4.4.2/ext/standard/datetime.c:918
#4  0xa7d4cee2 in execute_internal (execute_data_ptr=<incomplete type>, return_value_used=1) at /tmp/php4-4.4.2/Zend/zend_execute_API.c:42
#5  0xa78272cc in xdebug_execute_internal (current_execute_data=0xafb1a928, return_value_used=1) at /tmp/tmpxiAFCR/xdebug-2.0.0beta4/xdebug.c:1283
#6  0xa7d6c53f in execute (op_array=0x85c97ac) at /tmp/php4-4.4.2/Zend/zend_execute.c:1677
#7  0xa7827661 in xdebug_execute (op_array=0x85c97ac) at /tmp/tmpxiAFCR/xdebug-2.0.0beta4/xdebug.c:1226
#8  0xa7d6a366 in execute (op_array=0x8709c3c) at /tmp/php4-4.4.2/Zend/zend_execute.c:1719
#9  0xa7827661 in xdebug_execute (op_array=0x8709c3c) at /tmp/tmpxiAFCR/xdebug-2.0.0beta4/xdebug.c:1226
#10 0xa7d6ba74 in execute (op_array=0x82c012c) at /tmp/php4-4.4.2/Zend/zend_execute.c:2272
#11 0xa7827661 in xdebug_execute (op_array=0x82c012c) at /tmp/tmpxiAFCR/xdebug-2.0.0beta4/xdebug.c:1226
#12 0xa7d56f79 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /tmp/php4-4.4.2/Zend/zend.c:934
#13 0xa7d27b02 in php_execute_script (primary_file=0xafb20b84) at /tmp/php4-4.4.2/main/main.c:1753
#14 0xa7d76201 in php_handler (r=0x82b8fa8) at /tmp/php4-4.4.2/sapi/apache2handler/mod_php4.c:596
#15 0x08077e38 in ap_run_handler ()
#16 0x080781bc in ap_invoke_handler ()
#17 0x08069c7f in ap_process_request ()
#18 0x08064c52 in _start ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-08 13:50 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

(And upgrade your Xdebug, as your're using an old beta)
 [2006-06-12 17:22 UTC] rick at dualmedia dot it
<?php
$tpl =& new HTML_Template_Sigma('/tmp', '/tmp/cache');
$this->data_scadenza = '';
$tpl->setVariable('data',date("d/m/Y",(strtotime($this->data_scadenza))));
?>
 [2006-06-12 17:56 UTC] bjori@php.net
"and does not require any external"...
Please provide SHORT but COMPLETE reproducable example.
 [2006-06-12 18:05 UTC] bjori@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Can't reproduce

 [2006-06-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 14:01:34 2024 UTC