php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10979 segfault on get_class_methods("Directory");
Submitted: 2001-05-21 00:02 UTC Modified: 2001-05-21 01:22 UTC
From: enigma at turingstudio dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.0.4pl1 OS: linux/redhat 6.2
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: enigma at turingstudio dot com
New email:
PHP Version: OS:

 

 [2001-05-21 00:02 UTC] enigma at turingstudio dot com
I'm writing a little method in a debug class that outputs 
all of the loaded classes for the system, using 
get_class_methods().

My class started to segfault with this code:


	function _output_all_classes() {

		$this->_output_header('All Classes');

		$classes = get_declared_classes();
		foreach ($classes as $key) {
			
			echo $key;
			echo "\n";

			$class_methods = get_class_methods($key);
	
			if ($class_methods != '') {
				foreach ($class_methods as $key) {
					echo "    ";
					echo $key;
				}
			}

			echo "\n\n";

			$vars = get_class_vars($key);
			if ($vars != '') {
				foreach ($vars as $key) {
					echo "    ";
					echo $key;
				}
			}

		}

	}

So I got a list, and tested each name individually.

This code segfaults apache:

get_class_methods("Directory");

not a bid deal, as this is a default class, but I think 
this is probably unexpected behavior :)

_alex

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-21 01:22 UTC] sniper@php.net
This seems to be fixed in PHP 4.0.6RC1. 
Please try it:

http://www.php.net/~andi/php-4.0.6RC1.tar.gz

Reopen if it segfaults with that.

--Jani



 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 00:01:29 2025 UTC