php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19566 get_declared_classes() segfaults
Submitted: 2002-09-23 19:39 UTC Modified: 2002-11-15 09:00 UTC
From: rpav at users dot sf dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.0-dev OS: Linux PPC
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: rpav at users dot sf dot net
New email:
PHP Version: OS:

 

 [2002-09-23 19:39 UTC] rpav at users dot sf dot net
Easy to reproduce:

<? get_declared_classes(); ?>

This can be added to, but when it hits that function, boom, sig11.  Note this _only_ happens on ppc linux; there have been no problems on the intel boxes we've tried.

Module list:

xml
standard
session
posix
pcre
mysql
ctype

Other info:
linux 2.2.10-12a, ppc (Yellow Dog Linux)
glibc 2.2.1-0f
gcc version 2.95.3 20010111 (prerelease/franzo/20010111)
apache 1.3.23

Backtrace:
#0  0x100c6b80 in zend_hash_index_update_or_next_insert (ht=0x1016dbe8, h=0, 
    pData=0x7fffe278, nDataSize=4, pDest=0x0, flag=4) at zend_hash.c:375
#1  0x100c4438 in add_next_index_stringl (arg=0x10143800, 
    str=0x1014d9e0 "__PHP_Incomplete_Class", length=22, duplicate=1)
    at zend_API.c:847
#2  0x100cbddc in copy_class_name (ce=0xfdf5604, num_args=0, args=0x7fffe278, 
    hash_key=0x4) at zend_builtin_functions.c:901
#3  0x100c7960 in zend_hash_apply_with_arguments (ht=0x10146b00, 
    destruct=0x100cbd6c <copy_class_name>, num_args=1) at zend_hash.c:731
#4  0x100cbe3c in zif_get_declared_classes (ht=269933544, 
    return_value=0x10173568, this_ptr=0x7fffe278, return_value_used=4)
    at zend_builtin_functions.c:916
#5  0x100e4acc in execute (op_array=0x1016dcf0) at ./zend_execute.c:1598
#6  0x100c1d98 in zend_execute_scripts (type=269933544, retval=0x0, 
    file_count=3) at zend.c:812
#7  0x1001a034 in php_execute_script (primary_file=0x7ffff838) at main.c:1383
#8  0x100174cc in main (argc=2, argv=0x7ffffb14) at cgi_main.c:778
#9  0x0fd94238 in __libc_start_main (argc=2, ubp_av=0x7ffffb14, 
    ubp_ev=0x7fffe278, auxvec=0x7ffffb78, rtld_fini=0x1016dbe8, 
    stinfo=0x100eaba0, stack_on_entry=0x6c657465)
    at ../sysdeps/powerpc/elf/libc-start.c:119

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-20 10:30 UTC] iliaa@php.net
Please try using this CVS snapshot:

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


 [2002-11-07 01:31 UTC] rpav at users dot sf dot net
As of 12:00 (PST) today (2002/11/6) this crash was still an issue.  I compiled the latest snap while trying to fix another segfault, and this segfault still occurs.
 [2002-11-07 01:40 UTC] nicos@php.net
Sorry but I can't reproduce it with the latest CVS.

[Thu Nov  7 - 08:37:50 - root ~/php4]# gdb php
GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run test.php
Starting program: /usr/local/bin/php test.php

Program exited normally.
(gdb)

It looks fixed.
 [2002-11-07 01:49 UTC] rpav at users dot sf dot net
It's not.  For the record I'd like to point out the fact this is a Linux-PPC problem, not a Linux-i386 problem. ;-)
 [2002-11-07 01:53 UTC] derick@php.net
reopen
 [2002-11-07 12:36 UTC] sniper@php.net
updated to latest PHP version this was reproduced with..

 [2002-11-15 09:00 UTC] moriyoshi@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 16:01:29 2024 UTC