Skip to content

AOT: skip zero-byte helper-runtime unit.o — hash_hmac_algos link (#6229) - #35576

Merged
PurHur merged 1 commit into
masterfrom
fix/helper-runtime-empty-unit-o-6229
Aug 28, 2026
Merged

AOT: skip zero-byte helper-runtime unit.o — hash_hmac_algos link (#6229)#35576
PurHur merged 1 commit into
masterfrom
fix/helper-runtime-empty-unit-o-6229

Conversation

@PurHur

@PurHur PurHur commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • HelperRuntimeCache::unitObjectIsLinkable() rejects unit.o files with filesize() === 0.
  • helperIndex() and linkObjects() use it so interrupted emit artifacts do not shadow committed prelinked helper objects.
  • Fixes AOT link failure: undefined reference to PHPCompiler_ext_standard_ArrayIsListJitHelper__islist in hash_hmac_algos fixture (array_is_list bridge).

Root cause

build/helper-runtime-cache/units/ext_standard_ArrayIsListJitHelper_php/unit.o was 0 bytes while manifest/bc looked fresh. Build cache outranks prelinked in helperIndex(), so tryProvide bound an extern declaration but linked an empty object.

Test plan

./script/aot-smoke.sh
# aot-smoke: 8 passed, 0 failed

./script/phpunit.sh --filter 'HelperRuntimeCacheFingerprintTest::testUnitObjectIsLinkableRejectsZeroByteObject|HelperRuntimeCacheFingerprintTest::testHelperIndexFallsBackToPrelinkedWhenBuildCacheObjectEmpty|AotTest::testCases with data set "hash_hmac_algos"'
# OK (3 tests, 10 assertions)

Relates #6229 / #15889

Made with Cursor

Interrupted emit can leave an empty build-cache unit.o that shadows the
committed prelinked object; AOT then links no helper body and hash_hmac_algos
(array_is_list) fails with undefined ArrayIsListJitHelper symbols (#6229).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit e40b86d into master Aug 28, 2026
1 check failed
@PurHur
PurHur deleted the fix/helper-runtime-empty-unit-o-6229 branch August 28, 2026 01:26
PurHur added a commit that referenced this pull request Aug 28, 2026
…low-up). (#35579)

#35574 added JitMbGetInfo, MbGetInfoJitHelper, and MbGetInfoRuntime to the
compile spine but left duplicate require_once lines (7965/7962). Remove the
three extras so spine-count-sync reports 7962/7962 again.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant