Skip to content

php-in-php: delete JitRename libc defer — kernel bridge (#19215) - #19228

Closed
PurHur wants to merge 1 commit into
masterfrom
agent/issue-19215-jit-rename-defer-delete
Closed

php-in-php: delete JitRename libc defer — kernel bridge (#19215)#19228
PurHur wants to merge 1 commit into
masterfrom
agent/issue-19215-jit-rename-defer-delete

Conversation

@PurHur

@PurHur PurHur commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove JitRename::invokeLibc and UserScriptAotDeferNestedJit defer from the rename JIT path; JitRename always delegates to StringRename.
  • User-script AOT StringRename bridge now calls JitRenameKernel (thin libc rename(2)) and invalidates stat cache via StatCacheJitHelper::clearPath after success.
  • Add @internal phpc_rename_kernel + JitRenameKernel so RenameJitHelper helper units avoid rename() builtin recursion; refresh prelinked RenameJitHelper unit (c2e3d15b9c70bbb71e64).

C removed: ~20 lines invokeLibc LLVM from ext/standard/JitRename.php.

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/RenameRuntimeShrinkTest.php
vendor/bin/phpunit test/unit/RenameBuiltinTest.php --filter testVmMatchesPhpSubset
make bootstrap-selfhost-vm-driver-execute-probe
vendor/bin/phpunit test/unit/RenameBuiltinTest.php --filter testAotNativeBinaryMatchesPhpSubset
'
  • RenameRuntimeShrinkTest — OK (Zend delegate test skipped; source guards OK)
  • RenameBuiltinTest::testVmMatchesPhpSubset — OK
  • bootstrap-selfhost-vm-driver-execute-probe — OK
  • RenameBuiltinTest::testAotNativeBinaryMatchesPhpSubsetpartial: rename() returns true (ok + moved), but is_file($to) still nonew (stat cache coherence across prelinked StatPath vs StatCache helper TUs; same shape as master libc defer)

Merge status

Not merging — AOT repro not fully green (is_file($to) after successful rename). Follow-up needed on helper-runtime VmStatCache TU coherence before closing #19215.

Closes #19215 when follow-up lands.

Made with Cursor

…lper refresh (#19215)

Remove user-script AOT inline rename(2) LLVM from JitRename; route through
StringRename with JitRenameKernel libc path and stat-cache invalidation.
Add phpc_rename_kernel internal for helper-unit lowering without rename()
builtin recursion; refresh RenameJitHelper prelink (c2e3d15b9c70bbb71e64).

AOT rename execute parity improved (ok+moved); is_file($to) after rename
still stale — follow-up for StatPath/StatCache helper TU coherence.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur

PurHur commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

Maintainer: holding merge — AOT is_file($to) after rename still nonew (stat-cache TU coherence). Prefer one landing PR for #19215 once execute parity is complete; close the duplicate slice when the other merges.

@PurHur

PurHur commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #19248 (AOT is_file kernel + rename done-when green).

@PurHur PurHur closed this Jul 15, 2026
@PurHur
PurHur deleted the agent/issue-19215-jit-rename-defer-delete branch July 20, 2026 02:03
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.

php-in-php: delete JitRename libc defer bridge — route user-script AOT through JitVmHelperLink + RenameJitHelper PHP (#1492)

1 participant