php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #900 Segfault in read_next_token from token_cache.c:174
Submitted: 1998-11-05 15:05 UTC Modified: 1999-11-28 17:39 UTC
From: elefler at cvdls dot ucdavis dot edu Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.5 OS: Solaris 2.x
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: elefler at cvdls dot ucdavis dot edu
New email:
PHP Version: OS:

 

 [1998-11-05 15:05 UTC] elefler at cvdls dot ucdavis dot edu
o Apache segfaults on a very large PHP script.
  PHP files are parsed and output stops while
  running a large for-loop. Only a partial page
  is returned.

o Did not notice problem in 3.0.2a

o PHP options from httpd.conf
php3_user_dir www
php3_memory_limit 64000000
php3_max_execution_time 600 
php3_safe_mode Off 
php3_include_path ./:/usr/home/httpd/php-lib...

o PHP 3.0.5 compiled into Apache+Raven 1.3.3:

--with-apache=../apache_1.3.3 
--with-gd=../gd1.3
--with-oracle 
--with-mysql=/u01/app/mysql 
--with-ldap=/usr/local
--with-zlib 
--with-dbase 
--enable-debugger   

o Output from gdb:
Program received signal SIGSEGV, Segmentation fault.
read_next_token (tcm=0x16fd34, token=0xefffc804, phplval=0xefffe5f0)
    at token_cache.c:174
174             return (*token)->token_type;
(gdb) bt
#0  read_next_token (tcm=0x16fd34, token=0xefffc804, phplval=0xefffe5f0)
    at token_cache.c:174
#1  0x35e94 in phplex (phplval=0xefffe5f0) at main.c:435
#2  0x6e808 in phpparse () at /usr/lib/bison.simple:387
#3  0x3784c in php3_parse (yyin=0x171e08) at main.c:1465
#4  0x37b60 in apache_php3_module_main (r=0x1ab660, fd=23,
    display_source_mode=0, preprocessed=0) at main.c:1845
#5  0x349b8 in send_php3 ()
#6  0x34a40 in send_parsed_php3 ()
#7  0x9f314 in ap_invoke_handler ()
#8  0xb998c in process_request_internal ()
#9  0xb9a0c in ap_process_request ()
#10 0xae904 in child_main ()
#11 0xaeb74 in make_child ()
#12 0xaed78 in startup_children ()
#13 0xaf698 in standalone_main ()
#14 0xb0194 in main ()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-28 17:39 UTC] rasmus at cvs dot php dot net
I doubt this still happens in the current versions of the various packages involved here.  If it does, please re-submit.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC