PHP 4.0 Bug #2987: latest CVS segfaults
| From: | danny dot heijl at cevi dot be | Date: | Thu, 16 Dec 1999 22:01:11 +0000 |
| Subject: | PHP 4.0 Bug #2987: latest CVS segfaults | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-13765@lists.php.net to get a copy of this message | ||
From: danny.heijl@cevi.be
Operating system: LINUX RH 6.0
PHP version: 4.0 Latest CVS (16/12/1999)
PHP Bug Type: Reproduceable crash
Bug description: latest CVS segfaults
The following simple script segfaults :
<?php
// assigning from a function
function rtn($rtn)
{
return ($rtn);
}
$a[0]="a";
$a[1]="b";
$a[2]="c";
$b=rtn($a);
asort($b);
$key=key($b);
$data=current($b);
while ("" != (string) $key) {
echo "KEY: $key, VAL: $data\n";
$data=next($b);
$key=key($b);
}
?>
Program received signal SIGSEGV, Segmentation fault.
0x808e2c2 in do_end_variable_parse (type=0, arg_offset=0) at zend_compile.c:525
525 le = fetch_list_ptr->head;
(gdb) bt
#0 0x808e2c2 in do_end_variable_parse (type=0, arg_offset=0)
at zend_compile.c:525
#1 0x808eee9 in do_return (expr=0xbfffec88) at zend_compile.c:976
#2 0x80d8d09 in zendparse () at /home/web/php/php4/./libzend/zend-parser.y:184
#3 0x809c99b in v_compile_files (mark_as_ref=0, file_count=3,
files=0xbffffa14) at /home/web/php/php4/./libzend/zend-scanner.l:355
#4 0x809c900 in compile_files (mark_as_ref=0, file_count=3)
at /home/web/php/php4/./libzend/zend-scanner.l:325
#5 0x8087906 in php_execute_script (primary_file=0xbffffa94) at main.c:1281
#6 0x806da91 in main (argc=2, argv=0xbffffaf4) at cgi_main.c:464
#7 0x400d3cb3 in __libc_start_main (main=0x806d5fc <main>, argc=2,
argv=0xbffffaf4, init=0x806c2f0 <_init>, fini=0x818f60c <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffaec)
at ../sysdeps/generic/libc-start.c:78
(gdb)
Danny
---