php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7906 Apache segfault in misterious circumstance
Submitted: 2000-11-21 11:04 UTC Modified: 2000-12-30 19:51 UTC
From: erubboli at alu-net dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.3pl1 OS: Linux Slackware 7.1
Private report: No CVE-ID: None
 [2000-11-21 11:04 UTC] erubboli at alu-net dot com
##PHP
./configure --prefix=/www/php4 --with-config-file-path=/www/apache/conf/ --with-apxs=/www/apache/bin/apxs --with-gd=/www/libs/gd/ --with-mysql=/www/mysql/  --enable-trans-sid --enable-debug

#APACHE
./configure --prefix=/www/apache/ --enable-module=all --enable-shared=max --server-uid=65534 --server-gid=65534 --disable-rule=SSL_COMPAT --enable-rule=SSL_SDBM

Program received signal SIGSEGV, Segmentation fault.
0x402682da in ?? ()
(gdb) bt
#0  0x402682da in ?? ()
#1  0x4028d23c in ?? ()
#2  0x4028d323 in ?? ()
#3  0x40259846 in ?? ()
#4  0x40259a9b in ?? ()
#5  0x4025bbb1 in ?? ()
#6  0x4025bbb1 in ?? ()
#7  0x4025bbb1 in ?? ()
#8  0x40267243 in ?? ()
#9  0x402763c9 in ?? ()
#10 0x40272fc1 in ?? ()
#11 0x40273881 in ?? ()
#12 0x402738b4 in ?? ()
#13 0x8055109 in ap_invoke_handler ()
#14 0x80698ff in process_request_internal ()
#15 0x8069966 in ap_process_request ()
#16 0x8060aa6 in child_main ()
#17 0x8060c81 in make_child ()
#18 0x8060dfc in startup_children ()
#19 0x806145d in standalone_main ()
#20 0x8061cac in main ()
#21 0x400b5577 in __libc_start_main () from /lib/libc.so.6

for example, this lines cause segfault:

$a; //This is an array
while(list($key,$val) each($a)){
   if (is_int($key)){
...
  }
}

but when i use this :
while(list($key,$val) each($a)){
 ' '.is_int($key); //without sense
 if (is_int($key)){
...
  }
}
all goes correctly 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-22 08:18 UTC] sniper@php.net
Please add a full working but short script which
can be used to reproduce this.

With your example line I get a parse error
because of missing '='. (list() each() is incorrect)

--Jani
 [2000-12-30 19:51 UTC] sniper@php.net
No feedback and  I can not reproduce this.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 16:01:35 2024 UTC