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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 23 06:01:33 2025 UTC