Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79787 invoked from network); 31 Jan 2015 05:04:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2015 05:04:37 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.192.45 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.45 mail-qg0-f45.google.com Received: from [209.85.192.45] ([209.85.192.45:49858] helo=mail-qg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/9D-34022-3626CC45 for ; Sat, 31 Jan 2015 00:04:36 -0500 Received: by mail-qg0-f45.google.com with SMTP id q107so41190643qgd.4 for ; Fri, 30 Jan 2015 21:04:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type; bh=DIH4xw9q/L6IlFGoeR/+xLRcF0XmiBOcWn5aOZfiqZ4=; b=BsWk9PQZZgMH72eFpvPNWezMxL3/6KCvJHMkfO81wlUYM2tdvF9H4m4xXpw1lhWshN lnu6nIiaM0kCwOb1Df6E3nKHBJhEpXrQKKuA1rtLcEm+rBX38PlmAh4DEH6bZjzUyGsW vJO7+jg1WEX6lc1PnHqALqyxpB5k/2TRn48aNeYvwjKj/s2lo/mnUutjsollPcaAXG33 YQRmkAIySw7eDz4bZmDRTKF+VcoCqlBNC2V7z9wv5j5iQW4VRWaOr/vHjO6vJJxLzlJV nXZ5QMWOGiZT2qkFjd5hgD+/roYDIEPqN4GPPTcZSpA+YGyrE0C1DBf0yQGHJzaJyPBR dyGQ== X-Gm-Message-State: ALoCoQlpE7F5haFa8l9/4qeyqQCZ3bQmcoy71PoU+bmuZ2djpxRfE5YSSEq7SWNgonVKNzuAZhru X-Received: by 10.140.39.84 with SMTP id u78mr15046760qgu.63.1422680672400; Fri, 30 Jan 2015 21:04:32 -0800 (PST) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id n10sm4411727qab.2.2015.01.30.21.04.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jan 2015 21:04:31 -0800 (PST) Message-ID: <54CC625E.8030802@lerdorf.com> Date: Fri, 30 Jan 2015 21:04:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "internals >> PHP internals" Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AO1ajxs8dWFIn2kWirEoxGeqRNLxg0GLi" Subject: Magic getter bug tickled by Moodle From: rasmus@lerdorf.com (Rasmus Lerdorf) --AO1ajxs8dWFIn2kWirEoxGeqRNLxg0GLi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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_navi= gation.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) -Rasmus --AO1ajxs8dWFIn2kWirEoxGeqRNLxg0GLi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlTMYl4ACgkQlxayKTuqOuD9CwCcDr8l9MMSIs5FhaQZBks5ru1/ 0KAAniDTIoLLt910lF9jNH6o3qdPtqC8 =hU+o -----END PGP SIGNATURE----- --AO1ajxs8dWFIn2kWirEoxGeqRNLxg0GLi--