Bug #11590: Segmentation fault when using an empty string as an array
| From: | phpbugs at ans-netz dot de | Date: | Wed, 20 Jun 2001 20:46:03 +0000 |
| Subject: | Bug #11590: Segmentation fault when using an empty string as an array | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57459@lists.php.net to get a copy of this message | ||
From: phpbugs@ans-netz.de
Operating system: Linux 2.4.3 i686
PHP version: 4.0.5
PHP Bug Type: Reproducible crash
Bug description: Segmentation fault when using an empty string as an array
A Function in a class:
function mParseStatisticData ($ids,$result="" ) {
// some stuff inside;
$result_[$pos]["threadid"] = $result[$pos]["threadid"];M
$result_[$pos]["readcount"] = $result[$pos]["readcount"];M
}
I call these function with:
$result_ = $this->mParseStatisticData($a);
And the apache processes stops with a segmentation fault:
[Wed Jun 20 17:46:20 2001] [notice] child pid 28697 exit
signal Segmentation fault (11)
How to fix it:
function mParseStatisticData ($ids,$result=array() ) {
Ok, it's wrong to use a string as an array... my fault..
but.. why my apache (1.3.20) crashes with a segfault? ;-)
Greetings Olli
--
Edit Bug report at: http://bugs.php.net/?id=11590&edit=1