Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45168 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13183 invoked from network); 31 Jul 2009 19:21:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2009 19:21:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 209.85.219.224 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 209.85.219.224 mail-ew0-f224.google.com Received: from [209.85.219.224] ([209.85.219.224:40915] helo=mail-ew0-f224.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/AE-40158-A24437A4 for ; Fri, 31 Jul 2009 15:21:15 -0400 Received: by ewy24 with SMTP id 24so1493988ewy.23 for ; Fri, 31 Jul 2009 12:21:12 -0700 (PDT) Received: by 10.210.91.7 with SMTP id o7mr3563433ebb.54.1249068072041; Fri, 31 Jul 2009 12:21:12 -0700 (PDT) Received: from monster.local ([76.84.30.125]) by mx.google.com with ESMTPS id 28sm4727820eyg.0.2009.07.31.12.21.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 31 Jul 2009 12:21:10 -0700 (PDT) Message-ID: <4A734423.2090001@chiaraquartet.net> Date: Fri, 31 Jul 2009 14:21:07 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: PHP Developers Mailing List , Dmitry Stogov X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: serious bug in PHP 6 ZE From: greg@chiaraquartet.net (Greg Beaver) Hi, After quite a while of trying, I've tracked down the problem that is causing occasional segfaults in run-tests.php in PHP 6. Basically, here's what happens: on line 1652, we call system_with_timeout() to run the test, passing in a CV ($cmd) containing the command line to execute to run the test. In the cleanup of the active symbol table when returning from system_with_timeout(), the refcount of $commandline is not correct, and so the $cmd zval is efreed. At some random points, the return value of the run_test() occupies the same space that $cmd once occupied, gets efreed, and we crash. To get a segfault every time, put a simple var_dump($cmd); on line 1653 in run-tests.php and do "make test" So, it seems that either refcounting is not incrementing enough, or decrementing too much in PHP 6. Greg