-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable FFI+Opcache preload optimization #8
Comments
Preloading suffers from cyclic dependencies and could not preload classes that depend on each other. Let's say that class In this case preload will fail... |
There is a bug in preload + pointer casting that results in memory heap corruption: https://bugs.php.net/bug.php?id=78761 |
To make preloading work, all |
Preload mode will only work in following releases of PHP7.4 (RC5 doesn't contain a patch for https://bugs.php.net/bug.php?id=78761) |
Opcache preloading is broken, need at least PHP7.4.2 to include a bug fix for https://bugs.php.net/bug.php?id=78918 |
Windows doesn't support opcache preloading as of 7.4.2. Support was removed by @nikic in php/php-src@59c3dda due to ASLR restrictions for internal classes. Additional details can be found here: php/php-src#4999 |
Note that you can use |
Thank you for replying, Nikita! I know about this configuration option, but my header file contains some macros which should be resolved in runtime accordind to platfrom, for example |
Loading/parsing definition of C headers in runtime is not good, also,
ffi.enable
is equal topreload
by default, thus, to make this library active by default, preloading of C headers should be added.Ideally, this requires some infrastructure support to activate FFI preloading.
The text was updated successfully, but these errors were encountered: