You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Always-on LibcExtern still registers libc strlen(3) even though:
User-script strlen() already lives in PHP (ext/types/strlen.php + JitStrlen / VmString::byteLength) — not libc on char*.
~65 NestedJIT leaves call lookupFunction('strlen') for compile-time C-string length (session/stream/ob/parse_str/CLI/Reflection/env) — they rely on the always-on row.
Category
php-in-php· runtime-shrink (#1492, peer #31997 strtod / #31988 strtol / #31971 strcmp)Problem
Always-on
LibcExternstill registers libcstrlen(3)even though:strlen()already lives in PHP (ext/types/strlen.php+JitStrlen/VmString::byteLength) — not libc onchar*.lookupFunction('strlen')for compile-time C-string length (session/stream/ob/parse_str/CLI/Reflection/env) — they rely on the always-on row.ext/standard/Module.phpjitInitstill always-declaresstrlenas a fallback — that path should drop with the LibcExtern row (peer php-in-php: drop always-on LibcExtern strtod after NestedJIT module-local (#31988 shape) #31997 strtod).ext/typesPHP (JitStrlen)LibcExternstrlenrowLibcExtern::ensureStrlenDecl()before lookupModule::jitInitimplementStrlenBodyafter always-on declensureStrlenDeclthen body (#98 / #21109)php-src reference
ext/standard/string.c—PHP_FUNCTION(strlen)Zend/zend_operators.c—Z_STRLEN/ string length onzend_string, not libcstrlenon user valuesPHP implementation target
lib/JIT/LibcExtern.php— drop'strlen'always-on row; addensureStrlenDecl();implementStrlenBodycalls it firstLibcExtern::ensureStrlenDecl()beforelookupFunction('strlen')ext/standard/Module.php— drop always-on strlenjitInitfallbacktest/unit/LibcExternDeadDeclsRuntimeShrinkTest.php+StrlenRuntimeShrinkTest— assert row gone + consumer wiringRepro
Done when
LibcExternhas no always-on'strlen' =>rowlookupFunction('strlen')sites callensureStrlenDecl()first (or declare module-locally)LibcExternDeadDeclsRuntimeShrinkTest+ shrink guard green