Date: Mon, 9 Oct 2006 14:56:45 GMT From: Scott MacVicar<scottmacvicar@ntlworld.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/104215: Segfault with PHP function call when the tokenizer extension is built as an external module Message-ID: <200610091456.k99EujNS094815@www.freebsd.org> Resent-Message-ID: <200610091500.k99F0e01097593@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 104215 >Category: ports >Synopsis: Segfault with PHP function call when the tokenizer extension is built as an external module >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 09 15:00:39 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Scott MacVicar >Release: 4.10-RELEASE-p5 / 4.11-RELEASE-p13 / FreeBSD 4.11-RELEASE-p19 >Organization: Jelsoft Enterprises Ltd >Environment: There are various machines customers are using, all of them are using 4.x. >Description: I've already reported this to the PHP bug list and they've decided its got nothing to do with them, I tend to disagree though. When using the token_get_all function there is a segfault, the back trace is as follows. Program received signal SIGSEGV, Segmentation fault. 0x80d216d in _efree () (gdb) bt #0 0x80d216d in _efree () #1 0x80de408 in _zval_dtor () #2 0x4861f8e6 in tokenize () from /usr/local/lib/php/20020429/tokenizer.so #3 0x48620041 in zif_token_get_all () from /usr/local/lib/php/20020429/tokenizer.so #4 0x80f14bb in execute () #5 0x80df699 in zend_execute_scripts () #6 0x80ba79f in php_execute_script () #7 0x80f8241 in main () #8 0x805cf86 in _start () Sorry its not very informative. To fix this I forced the tokenizer to be compiled into PHP by adding it to the configure line. PHP Bug report is: http://bugs.php.net/bug.php?id=38449 >How-To-Repeat: Place this in a file. <?php $tokens = token_get_all('<?php $var = 2; ?>'); var_dump($tokens); ?> run via command line php foo.php >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610091456.k99EujNS094815>