php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47488 Segmentation Fault
Submitted: 2009-02-24 09:55 UTC Modified: 2009-02-24 10:19 UTC
From: sub at xu9 dot de Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.8 OS: Linux
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: sub at xu9 dot de
New email:
PHP Version: OS:

 

 [2009-02-24 09:55 UTC] sub at xu9 dot de
Description:
------------
While using the pear Class Spreedsheet_Excel_Writer i noticed a reproduciable segmentation fault.

due to the fact pear is (to my knowledge) entirely php-code, this seems to be a bug in php itself.

I tested numberous versions of php, everywhere its the same!

It happend when trying to fill a cell with the string '@-'


Reproduce code:
---------------
<?php
require_once 'Spreadsheet/Excel/Writer.php';

// Creating a workbook
$workbook = new Spreadsheet_Excel_Writer();

// sending HTTP headers
$workbook->send('test.xls');

// Creating a worksheet
$worksheet =& $workbook->addWorksheet('Crash Demo');

// The actual data
$worksheet->write(0, 0, '@-');

// Let's send the file
$workbook->close();
?> 

Expected result:
----------------
Sending an XLS

Actual result:
--------------
Segmentation fault.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-24 10:12 UTC] sub at xu9 dot ed
I've been tracking down the bug to a recursive, never-ending call of a function.

Its basically a loop like this:

<?php
function f() {
	f();
}

f();
?> 

Anyway, i'm not sure if a segfault is the right reaction of php to this type of endless-loops?
 [2009-02-24 10:19 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Yes, this is expected.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC