Bug #78881 [Ver->Csd]: "Can't preload unlinked class" if class extends Exception
Edit report at https://bugs.php.net/bug.php?id=78881&edit=1
ID: 78881
Updated by: cmb@php.net
Reported by: mlocati at gmail dot com
Summary: "Can't preload unlinked class" if class extends
Exception
-Status: Verified
+Status: Closed
Type: Bug
Package: opcache
Operating System: Windows
PHP Version: 7.4.0
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
That PR has been merged long ago â closing.
Previous Comments:
------------------------------------------------------------------------
[2019-12-13 10:14:32] nikic@php.net
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
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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
Thread (8 messages)