Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6263 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64032 invoked by uid 1010); 7 Dec 2003 10:31:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 63998 invoked from network); 7 Dec 2003 10:31:34 -0000 Received: from unknown (HELO smtp1.pp.htv.fi) (212.90.64.119) by pb1.pair.com with SMTP; 7 Dec 2003 10:31:34 -0000 Received: from localhost.localdomain (cs181008.pp.htv.fi [213.243.181.8]) by smtp1.pp.htv.fi (Postfix) with ESMTP id A18797FE20; Sun, 7 Dec 2003 12:31:33 +0200 (EET) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id hB7AVXZK007432; Sun, 7 Dec 2003 12:31:33 +0200 Date: Sun, 7 Dec 2003 12:31:33 +0200 (EET) Reply-To: Jani Taskinen To: Andrey Hristov Cc: internals@lists.php.net In-Reply-To: <3FD206E3.2090703@hristov.com> Message-ID: References: <3FD206E3.2090703@hristov.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Segfault in HEAD From: sniper@iki.fi (Jani Taskinen) Please add this as one regression test..there are never too many of these. (If it doesn't already exist) --Jani On Sat, 6 Dec 2003, Andrey Hristov wrote: >Hi, >the following script segfaults when HEAD is used (no problem with PHP_4_3). >$s = "FUBAR"; >$s[0][] = 1; >?> > >Here is a session that shows the script and the error spotted by valgrind. >[session] > >bash-2.05b$ cat soffset.php >$s = "FUBAR"; >$s[0][] = 1; >?> >bash-2.05b$ valgrind ./php soffset.php >==4985== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. >==4985== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. >==4985== Using valgrind-2.0.0, a program supervision framework for >x86-linux. >==4985== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. >==4985== Estimated CPU clock rate is 300 MHz >==4985== For more details, rerun with: -v >==4985== >==4985== Invalid read of size 4 >==4985== at 0x814C3E3: zend_assign_dim_handler (zend_execute.c:2069) >==4985== by 0x814A22E: execute (zend_execute.c:1273) >==4985== by 0x812C1EA: zend_execute_scripts (zend.c:1016) >==4985== by 0x80F221B: php_execute_script (main.c:1625) >==4985== Address 0x0 is not stack'd, malloc'd or free'd >Segmentation fault >bash-2.05b$ ../4_3/php soffset.php >bash-2.05b$ > >[/session] > >Regards, >Andrey > >