Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64403 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19264 invoked from network); 21 Dec 2012 08:53:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Dec 2012 08:53:12 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.131 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.131 smtp131.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.131] ([67.192.241.131:40680] helo=smtp131.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/B4-20281-77324D05 for ; Fri, 21 Dec 2012 03:53:11 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp29.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 7E3B139850B; Fri, 21 Dec 2012 03:53:08 -0500 (EST) X-Virus-Scanned: OK Received: by smtp29.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 1FAF53984EC; Fri, 21 Dec 2012 03:53:08 -0500 (EST) Message-ID: <50D42373.9050208@sugarcrm.com> Date: Fri, 21 Dec 2012 00:53:07 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jani Ollikainen CC: "internals@lists.php.net" References: <50D1D9B9.4060505@mmd.net> <50D30656.8090207@mmd.net> <50D35BA0.5010301@sugarcrm.com> <5952719.MaJMSR3yMW@rofl> <50D420D7.7030203@mmd.net> In-Reply-To: <50D420D7.7030203@mmd.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Oh? Did I understand you correctly? If you can code PHP that crashes > PHP, it's that codes fault not PHP's fault? I've always thought PHP > to be high level programming language where PHP handles things for > you and you can't code anything that crashes it like that with > bus error? There are a number of ways that you could lead to a crash in PHP. Say, some infinite loops can end up in crashes. Calling some functions with specific parameters on some systems could end up in crashes. Some libraries in some versions can lead to crashes. Etc, etc. We live in imperfect world, and that includes software which necessarily relies on other software. Making it perfectly 100% crash proof would be impractical. If you have any proposal on how to solve this particular problem, you are welcome to propose a patch. Otherwise, much more practical solution would be to fix that code. > I think that it should at least gracefully exit, log error, what caused > what and where. Better option would be that it just works. We can't really gracefully exit when OS produces bus error on missing part of the file, because you changed it non-atomically. The only way to avoid it would be to not use mmap, which would be a performance hit and also not very helpful as you'd just get a mangled file instead. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227