php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32183 PHP Seg faults on normal code
Submitted: 2005-03-04 08:24 UTC Modified: 2005-03-09 00:54 UTC
From: zedar at zedar dot org Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.0.3 OS: Linux 2.4.26
Private report: No CVE-ID: None
 [2005-03-04 08:24 UTC] zedar at zedar dot org
Description:
------------
PHP segmentation faults on lines of unremarkable code (or  
in some cases, not code at all). The code causing the  
crashes is part of a large management system so i can't  
really provide a sample of what causes the crash, but I'm  
not sure it would help anyway. A couple of sample lines it  
has crashed on are shown below, but I'm not sure they  
caused the crash or if it was something else internal. 
It has also on occasion crashed while on non-php code, in 
the one case i saw it was a html comment. If i removed the 
comment, the page loaded fine.  

Reproduce code:
---------------
// Crashes on this line
$selected = ($status==$s)?'selected':''; 




Actual result:
--------------
From apache error log: 
 
[Fri Mar  4 16:49:54 2005] [error] PHP Warning:  Unknown   
list entry type in request shutdown (1919251285) in   
Unknown on line 0   
[Fri Mar  4 16:49:55 2005] [notice] child pid 23476 exit   
signal Segmentation fault (11)   
   

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-04 09:28 UTC] tony2001@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.


 [2005-03-07 04:12 UTC] zedar at zedar dot org
A sample page that produces a segfault is available at the 
following URL: 
http://barra.telenet.net.au/WAME/Users/Options/details2.txt 
 
Sorry about the lenght, but thats the minimum I could get 
it down to and still produce the seg fault. I can't give 
you access to an actual php version on the server as we 
use auto-prepends on our scripts, and you wouldn't see any 
output from it anyway. 
I have put comments in front of the sections of code that 
can be removed to stop it from segfaulting.
 [2005-03-07 20:10 UTC] sniper@php.net
Please try using this CVS snapshot:

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


 [2005-03-08 00:11 UTC] zedar at zedar dot org
Fantastic, works perfectly now. Thanks a lot.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 06:01:33 2024 UTC