Category
Foundation · AOT link · sibling to #31894
Problem
#31894 fixed memset.1 duplicate declarations in GcCollectCyclesRuntime::ensureExternal(), but the same pattern remained in ObStorageLlvm, OutputRewriteVarsStorage, UrlRewriterApplyRuntime, StringSscanfByRef, StringZlibJit — each calling module->addFunction('memcpy', …) when lookupFunction() threw while LibcExtern already had memcpy in the MODULE.
| Gate |
Before |
After fix |
script/aot-smoke.sh (default helper cache) |
0/8 — undefined reference to memcpy.1 |
8/8 |
php bin/compile.php -o /tmp/x test/repro/dom_xpath_relative_aot_31738.php |
link fail |
ok |
Prelinked helper units referencing stale memcpy.1/memset.2 must be refreshed (IniJitHelper, AssertOptionsJitHelper, DomStandaloneAotInitJitHelper minimum).
php-src reference
N/A — compiler link infrastructure.
PHP implementation target
lib/JIT/LibcExtern.php — public ensureExternalDecl() (getNamedFunction-first)
- Peer
ensureExternal() helpers delegate to it
- Refresh stale
prelinked/helper-runtime/ units
Repro
./script/docker-exec.sh -- bash -lc './script/aot-smoke.sh'
Done when
Category
Foundation· AOT link · sibling to #31894Problem
#31894 fixed
memset.1duplicate declarations inGcCollectCyclesRuntime::ensureExternal(), but the same pattern remained in ObStorageLlvm, OutputRewriteVarsStorage, UrlRewriterApplyRuntime, StringSscanfByRef, StringZlibJit — each callingmodule->addFunction('memcpy', …)whenlookupFunction()threw while LibcExtern already hadmemcpyin the MODULE.script/aot-smoke.sh(default helper cache)undefined reference to memcpy.1php bin/compile.php -o /tmp/x test/repro/dom_xpath_relative_aot_31738.phpokPrelinked helper units referencing stale
memcpy.1/memset.2must be refreshed (IniJitHelper, AssertOptionsJitHelper, DomStandaloneAotInitJitHelper minimum).php-src reference
N/A — compiler link infrastructure.
PHP implementation target
lib/JIT/LibcExtern.php— publicensureExternalDecl()(getNamedFunction-first)ensureExternal()helpers delegate to itprelinked/helper-runtime/unitsRepro
./script/docker-exec.sh -- bash -lc './script/aot-smoke.sh'Done when
aot-smoke8/8 with committed prelinked tier (no local cache)dom_xpath_relative_aot_31738.phplinks and runs