ports/104215: Segfault with PHP function call when the tokenizer extension is built as an external module
Scott MacVicar
scottmacvicar at ntlworld.com
Mon Oct 9 15:00:49 UTC 2006
>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:
More information about the freebsd-ports-bugs
mailing list