Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85942 invoked from network); 31 Jan 2015 07:13:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2015 07:13:21 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-la0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:57624] helo=mail-la0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/10-18293-F808CC45 for ; Sat, 31 Jan 2015 02:13:20 -0500 Received: by mail-la0-f48.google.com with SMTP id pv20so27383341lab.7 for ; Fri, 30 Jan 2015 23:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=s2EJ8ZBD/DF91KCoO4Ud312SDrGB/c9EEFyzEApsbSU=; b=Q14FyFUlcTE9YXrqty8wlbHw/SfQ2ltEC9n7gr/8jKYdi5GjeYr4LsRR9m3uPcaXif nt1F7hJC12NuicdcSSEQKlhc55kp1HjHL3OKQtl05Ym4PwyBK1e+m+8ByzLF4RWBwo/b 8EZwz8eW9Txua6qPV0EFRVraGzCYvV8QK0K9llkemLFJOmNsKBo1Wl0uwcHvJsTil6gx hSlwB/62Ye4Glw4RcRO5/CL5iLRBkOqpKgOtW9gNNxSsTTvJ1kDJF2LONqd3n5o192wT lDrueVq91xG2BnpCDeH1yMGwxR17wRmwv83bxXeU3PBtoIm3hRQk6c9l+RdbbQeoeJXE nYYw== MIME-Version: 1.0 X-Received: by 10.152.5.226 with SMTP id v2mr10071111lav.34.1422688396806; Fri, 30 Jan 2015 23:13:16 -0800 (PST) Sender: mike.php.net@gmail.com Received: by 10.115.1.132 with HTTP; Fri, 30 Jan 2015 23:13:16 -0800 (PST) Received: by 10.115.1.132 with HTTP; Fri, 30 Jan 2015 23:13:16 -0800 (PST) In-Reply-To: <54CC625E.8030802@lerdorf.com> References: <54CC625E.8030802@lerdorf.com> Date: Sat, 31 Jan 2015 08:13:16 +0100 X-Google-Sender-Auth: WgCAkxQzCFx3c9zUCBnVfLA4MPI Message-ID: To: Rasmus Lerdorf Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e013d1e52848fea050ded7440 Subject: Re: [PHP-DEV] Magic getter bug tickled by Moodle From: mike@php.net (Michael Wallner) --089e013d1e52848fea050ded7440 Content-Type: text/plain; charset=UTF-8 On 31 Jan 2015 06:04, "Rasmus Lerdorf" wrote: > > There is something weird going on with PHP7 and the moodle_page class > and all its magic methods. It dies with a: > > /var/www/moodle/blocks/navigation/block_navigation.php(223) : Notice - > Undefined property: moodle_page::$navigation > /var/www/moodle/blocks/navigation/block_navigation.php(223) : Fatal > error - __clone method called on non-object > > That code is: > > 222 $this->page->navigation->initialise(); > 223 return clone($this->page->navigation); > > See: > https://github.com/moodle/moodle/blob/master/blocks/navigation/block_navigation.php#L222-L223 > > $this->page_navigation is created on that initial call through the > wonders of this magic: > > https://github.com/moodle/moodle/blob/master/lib/pagelib.php#L757-L772 > > Which somehow leads us to read 8 bytes in a free'ed block: > > https://gist.github.com/anonymous/f9d1f53b1205d29d86cc > > but I am not having much luck dwindling it down to a simpler reproduce > case. If you know this code or have a couple of hours to spare, could > you see if you could reduce it to something more manageable for us? > > (and yes, same code is fine in 5.6) > Here's a similar bug, too: https://bugs.php.net/bug.php?id=68933&edit=1 --089e013d1e52848fea050ded7440--