Bug #78881 [PATCH]: "Can't preload unlinked class" if class extends Exception

From: Date: Fri, 13 Dec 2019 10:14:32 +0000
Subject: Bug #78881 [PATCH]: "Can't preload unlinked class" if class extends Exception
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224262@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78881&edit=1 ID: 78881 Patch added by: nikic@php.net Reported by: mlocati at gmail dot com Summary: "Can't preload unlinked class" if class extends Exception Status: Verified Type: Bug Package: opcache Operating System: Windows PHP Version: 7.4.0 Assigned To: cmb Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Remove support for preloading on Windows On GitHub: https://github.com/php/php-src/pull/4999 Patch: https://github.com/php/php-src/pull/4999.patch Previous Comments: ------------------------------------------------------------------------ [2019-12-10 12:29:59] cmb@php.net The problem is that internal class entries are stored on the heap, and the position of the heap is randomized by ASLR on Windows, so there seems to be nothing we can do (at least for PHP 7.4 due to BC restrictions). ------------------------------------------------------------------------ [2019-12-10 12:16:45] michael dot vorisek at email dot cz This should be fixed in PHP internally. \Exception class is maybe the most extended one and preloading one or more extended \Exception classes is more than expected. ------------------------------------------------------------------------ [2019-12-04 08:54:17] nikic@php.net I've added an improved error in https://github.com/php/php-src/commit/7cbf31a3c754961e0ebfd5022191c1c9080effdb. ------------------------------------------------------------------------ [2019-12-04 08:45:51] nikic@php.net This is expected: On Windows, due to ASLR, internal classes are unknown for the purposes of preloading. I think the only thing we can do here is a) improve the error message (it should not be "unknown reason") and b) documented this limitation. ------------------------------------------------------------------------ [2019-11-28 23:06:10] cmb@php.net Thanks for reporting! ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=78881 -- Edit this bug report at https://bugs.php.net/bug.php?id=78881&edit=1

« previous php.bugs (#224262) next »