php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46340 segmentation fault (11)
Submitted: 2008-10-19 08:39 UTC Modified: 2009-05-09 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: dl4gbe at gmail dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.2.6 OS: linux suse
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: dl4gbe at gmail dot com
New email:
PHP Version: OS:

 

 [2008-10-19 08:39 UTC] dl4gbe at gmail dot com
Description:
------------
I used to have functions (methods) in a class named "form" (not static). Later, I changed the design and moved the methods into a static class. named "xmlparser". In one case I forgot to change my code and still called the old instance method.

the old call was

$a_form->createTable($l_formnode);

it should have been:

xmlparser::createTable($a_form,$l_formnode);

Like said: I moved function createTable into the static class xmlparser.
The function was called from another static function located in xmlparser which had a valid form object instanized and a valid xml node as a second parameter
 

The result? I did not get a "function not found in class" or something like this error in the log file. No, I run into a crazy segmentation fault (11) error. I can't debug crazy segmentation fault errors(11)




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-19 11:48 UTC] scottmac@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

We would also need a short reproduce script about 10-20 lines that we can run.
 [2008-10-26 09:32 UTC] dl4gbe at gmail dot com
I can't provide lines of script. The error seems not to occure in simple scripts. I guess it only happens in more complicated structures that an segmentation fault happens in case a method of a class does not exist. I will try to build a debug version on my system. But that needs time. Just now, I am not able to compile php on the affected system.

I do not know if this helps:

public static function getFormHtml($a_row,$a_form)
{
$l_return = "";

$l_return .= "<tr class='" . $a_form->getCssFormTr() . "'>" . utils::getLineEnd();
$l_return .= "<td class='" . $a_form->getCssFormTd() . "'>" . utils::getLineEnd(); 
$l_return .= "<table class='" . $a_form->getCssFormTable() . "' width='100%'";
$l_return .= " id='" . $a_form->getControlName() . "_table_form_main" . "'>" . utils::getLineEnd();


utils::addToDebugLog("getFormHtml (Start)"); 

if ($a_form->getTabCount() == 0)
	{

	utils::addToDebugLog("getFormHtml (1)"); 


	$l_return .= "<tr class='" . $a_form->getCssTrForm() . "'>" . utils::getLineEnd();
	$l_return .= "<td class='" . $a_form->getCssTdForm() . "'>" . utils::getLineEnd();
	utils::getLineEnd();
	
// this line causes php to crash
$l_return .= $a_form->getTabHtml(0,$a_row);
// because I moved getTabHtml to htmlrender class as static
// and there is no function with this name in $a_form anymore	
// This is the line which I planned to call but forgot to change :-(
//$l_return .= htmlrender::getTabHtml(0,$a_row,$a_form);
// what I know is, using this line instead of the line above
// my program works and is not causing a segmentation error anymore. 

	$l_return .= "</td>" . utils::getLineEnd();
	$l_return .= "</tr>" . utils::getLineEnd();


	}
 [2008-10-27 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".
 [2009-05-01 21:28 UTC] felipe@php.net
Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/


 [2009-05-09 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-2025 The PHP Group
All rights reserved.
Last updated: Fri Sep 19 07:00:01 2025 UTC