|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2420 Segmentation fault in read_next_token at token_cache.c:177
Submitted: 1999-10-02 17:00 UTC Modified: 2002-06-16 08:58 UTC
From: Stephane dot Legrand at bigfoot dot com Assigned:
Status: Not a bug Package: Reproducible Crash
PHP Version: 3.0.12 OS: FreeBSD 3.3
Private report: No CVE-ID: None
 [1999-10-02 17:00 UTC] Stephane dot Legrand at bigfoot dot com
It seems that it's exactly the same bug as #900. The script stops with this backtrace :

This GDB was configured as "i386-unknown-freebsd"...
(gdb) run -X
Starting program: /usr/local/sbin/apache -X

Program received signal SIGSEGV, Segmentation fault.
0x806d0d5 in read_next_token (tcm=0x818cf3c, token=0xbfbfc8d4, 
    phplval=0xbfbfc9f0) at token_cache.c:177
177             return (*token)->token_type;
(gdb) bt
#0  0x806d0d5 in read_next_token (tcm=0x818cf3c, token=0xbfbfc8d4, 
    phplval=0xbfbfc9f0) at token_cache.c:177
#1  0x8066643 in phplex (phplval=0xbfbfc9f0) at main.c:496
#2  0x80ab2e0 in phpparse () at /usr/lib/bison.simple:431
#3  0x8067d24 in php3_parse (yyin=0x1830e398) at main.c:1548
#4  0x8067fe0 in apache_php3_module_main (r=0x81df034, fd=18, 
    display_source_mode=0, preprocessed=0) at main.c:1934
#5  0x80658b5 in send_php3 ()
#6  0x80658fd in send_parsed_php3 ()
#7  0x80b8ecb in ap_invoke_handler ()
#8  0x80c604d in process_request_internal ()
#9  0x80c609b in ap_process_request ()
#10 0x80c03b8 in child_main ()
#11 0x80c04e7 in make_child ()
#12 0x80c05dc in startup_children ()
#13 0x80c0a74 in standalone_main ()
#14 0x80c113f in main ()
#15 0x8065479 in _start ()

I've a script to reproduce this problem. It's too long to be included here but i can send it to anyone interested.

PHP : 3.0.12
Apache : 1.3.9
MySQL : 3.22.25 (the MySQL server is on a Linux box).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 08:58 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 22 15:01:23 2020 UTC