PHP 4.0 Bug #3372: Crash on arrays
| From: | stas at zend dot com | Date: | Tue, 01 Feb 2000 13:52:54 +0000 |
| Subject: | PHP 4.0 Bug #3372: Crash on arrays | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15106@lists.php.net to get a copy of this message | ||
From: stas@zend.com
Operating system: Linux
PHP version: 4.0 Latest CVS (01/02/2000)
PHP Bug Type: Reproduceable crash
Bug description: Crash on arrays
Crases on:
Program received signal SIGSEGV, Segmentation fault.
zend_hash_destroy (ht=0x83b2384) at ../../Zend/zend_hash.c:565
565 p = p->pListNext;
#0 zend_hash_destroy (ht=0x83b2384) at ../../Zend/zend_hash.c:565
#1 0x80931db in _zval_dtor (zvalue=0x83ae574,
__zend_filename=0x815a060 "../../Zend/zend_execute.c", __zend_lineno=339)
at ../../Zend/zend_variables.c:69
#2 0x80e79bf in zend_assign_to_variable (result=0x8273640, op1=0x8273650,
op2=0x8273660, value=0x83af78c, type=4, Ts=0xbfffd49c)
at ../../Zend/zend_execute.c:339
#3 0x80e242c in execute (op_array=0x8291f64) at ../../Zend/zend_execute.c:1278
#4 0x80e3331 in execute (op_array=0x83968fc) at ../../Zend/zend_execute.c:1574
#5 0x80e3331 in execute (op_array=0x81ced84) at ../../Zend/zend_execute.c:1574
#6 0x8084bec in php_execute_script (primary_file=0xbffffb4c)
at /home/php/php4/./main.c:1206
#7 0x809d221 in apache_php_module_main (r=0x81c64dc, fd=19,
display_source_mode=0) at /home/php/php4/sapi/apache/sapi_apache.c:86
#8 0x80834a3 in send_php (r=0x81c64dc, display_source_mode=0,
filename=0x81c70dc "/home/httpd/html/zend/tips/tips.php") at mod_php4.c:406
#9 0x80834e8 in send_parsed_php (r=0x81c64dc) at mod_php4.c:418
#10 0x80ed113 in ap_invoke_handler (r=0x81c64dc) at http_config.c:508
#11 0x81003b9 in process_request_internal (r=0x81c64dc) at http_request.c:1214
#12 0x810041c in ap_process_request (r=0x81c64dc) at http_request.c:1230
#13 0x80f7e1e in child_main (child_num_arg=0) at http_main.c:4035
#14 0x80f7fac in make_child (s=0x818f63c, slot=0, now=949412689)
Code part is as follows:
function set_var($varname, $value = "") {
if (!is_array($varname)) {
if (!empty($varname)) {
if ($this->debug)
print "scalar: set *$varname* to *$value*<br>\n";
$this->varvals[$varname] = $value;
}
} else {
reset($varname);
while(list($k, $v) = each($varname)) {
if (!empty($k)) {
if ($this->debug) print "array: set *$k* to *$v*<br>\n";
$this->varvals[$k] = $v;
}
}
}
}
What could be related, it also says:
Warning: Variable passed to each() is not an array or object in <FILE> on line 137
where line 137 is a line with each() in the code above.