Category
php-in-php | runtime-shrink
Problem
ext/standard/VmRandomNative.php still opens libc getrandom/open/read FFI even though #8921 added VmRandomPure as fallback. Self-host M5 should not link libc FFI for random_bytes() / openssl_random_pseudo_bytes() when /dev/urandom is readable via compiled stream read.
php-src reference
Repro
grep -c "FFI::cdef" ext/standard/VmRandomNative.php
Scope
| Layer |
Path |
| PHP impl |
ext/standard/VmRandomPure.php — SSOT via /dev/urandom read |
| VM |
ext/standard/VmRandomNative.php — thin delegate, no FFI::cdef |
| Tests |
Update test/unit/VmRandomNativeRuntimeShrinkTest.php |
Done when (php-src-strict)
Refs #8921, #1492
Category
php-in-php|runtime-shrinkProblem
ext/standard/VmRandomNative.phpstill opens libc getrandom/open/read FFI even though #8921 addedVmRandomPureas fallback. Self-host M5 should not link libc FFI forrandom_bytes()/openssl_random_pseudo_bytes()when/dev/urandomis readable via compiled stream read.php-src reference
ext/standard/random.c—php_random_bytes()Repro
grep -c "FFI::cdef" ext/standard/VmRandomNative.phpScope
ext/standard/VmRandomPure.php— SSOT via/dev/urandomreadext/standard/VmRandomNative.php— thin delegate, noFFI::cdeftest/unit/VmRandomNativeRuntimeShrinkTest.phpDone when (php-src-strict)
VmRandomNative.phphas no libc FFIrandom_bytes(16)repro withPHP_COMPILER_DISABLE_FFI=1matches Zend lengthmake bootstrap-selfhost-vm-driver-execute-probegreenRefs #8921, #1492