Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62006 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72789 invoked from network); 3 Aug 2012 14:28:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2012 14:28:15 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vc0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:36450] helo=mail-vc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/CA-09659-DFFDB105 for ; Fri, 03 Aug 2012 10:28:13 -0400 Received: by vcbgb30 with SMTP id gb30so841408vcb.29 for ; Fri, 03 Aug 2012 07:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=XxrHO7PO2d8LWhN7zoGkZ4KMvlFYXSPm+HHwNVF86DI=; b=MRp12F9eAhpbi2IH8Pq5WnI0puk7fgqxgemVo8kAjHEgDqRRx97Yd2cDyIlCCyarZy X5xaLunvxGI5Ss7KoA39fDp2oKviflATg11ep7RnWoO/VTsE5fbRHA8Nb0PiQVQEnGpo SpO3Lf/QqUwtoUQ3wut2qiiAHyFNo6Ehvof+U4lcJU7erlO7uHQSgqFIqHfS4poMFGXP iPx2g8IFAFTAaBkxyO6IDsz+1NgSfmPngmunT9g9rhbRnkDNbDEnhoH3thh7oligVC0R /HcRc4jIuKpIrzR7C5FhTYjkyQyhal2mlM4mgol68ZGIzynzX0LGVNC65ONZ5UJbzFDR 5KLg== Received: by 10.220.107.15 with SMTP id z15mr1462498vco.36.1344004089729; Fri, 03 Aug 2012 07:28:09 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.195.3 with HTTP; Fri, 3 Aug 2012 07:27:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Aug 2012 22:27:48 +0800 X-Google-Sender-Auth: CZ0Mfi7qTfo5M8t0s4BPDgwF4I8 Message-ID: To: Leigh Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Why do disabled functions / classes generate a WARNING. From: laruence@php.net (Laruence) On Fri, Aug 3, 2012 at 3:08 PM, Leigh wrote: > Hi all, > > Can anyone explain to me the reason that when a function or class is > disabled via the ini setting, an attempt to access the disabled item > generates a non-fatal error? > > I'm looking at a segfault in the SPL caused by the blind creation of a > class, which seems to only fail when the class is disabled. I'm > wondering in how many other places this could occur. > > The obvious solution is to be more careful and check return values, > but a FATAL would also have prevented execution continuing. > > Thanks, > > Leigh. Hi: this is a very badly bug. but I think it's not a spl issues, we should change the behavior of zend_disable_class, since for now, it will delete the class entry, which will make the class entry pointer (preserved by extension) become a wild pointer.. dereference it is a undefined behavior, in this sense, segfault is lucky. thanks > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/