
Fil-PHP
pizlonator merged 2 commits intopizlonator:delugepizlonator/fil-c:delugefrom mbrock:php-8.4mbrock/fil-c:php-8.4Copy head branch name to clipboard
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Repository navigation
Code
Issues70 (70)
Pull requests4 (4)
Discussions
Actions
Projects
Security and quality
Insights
More items
Fil-PHP 8.4.25 - #338
#338
Merged
pizlonator merged 2 commits intopizlonator:delugepizlonator/fil-c:delugefrom mbrock:php-8.4mbrock/fil-c:php-8.4Copy head branch name to clipboard
Oct 21, 2026
ConversationCommits2 (2)ChecksFiles changed
Merged
Fil-PHP 8.4.25#338
pizlonator merged 2 commits intopizlonator:delugepizlonator/fil-c:delugefrom mbrock:php-8.4mbrock/fil-c:php-8.4Copy head branch name to clipboard
Conversation
mbrock
commented
Oct 21, 2026
Copy link
Copy Markdown
projects/php.projeny is a URL-based projeny project for the php.net release tarball. The patch, ported from filnix's PHP 8.4 port, keeps capabilities that PHP and ext/dom's lexbor round-trip through integers (weak references, WeakMap keys, typed-property source lists, lexbor name IDs, C14N/schema namespace fixups), replaces inline assembly Fil-C cannot run or compile (wordwise string compare, zend_safe_address, the asm goto overflow arithmetic whose callbr crashes FilPizlonatorPass, raw xgetbv bytes, .debug_gdb_scripts), measures the Zend stack limit of ucontext fibers from their first frame, and maps opcache's cache privately (capabilities are per process, so a pointer one FPM worker caches is unusable in another) without the MAP_32BIT huge-page remap.
build_php.sh builds CLI, CGI, FPM and phpdbg plus opcache, intl, dom, gd, mbstring, curl, openssl, sqlite and friends, with the PCRE and opcache JITs and the fiber assembly disabled, then runs a smoke test of the patched areas. It runs from build_glibc_extras.sh because Fil-C's ucontext (needed by --disable-fiber-asm) is only in user glibc; under musl the link fails on pizlonated_swapcontext.
Amp-Thread-ID: https://ampcode.com/threads/T-01a15d2c-1d54-71bb-9384-cdd1921c2969
There was an error while loading. Please reload this page.
Add PHP 8.4.25 to the corpus
…
fd1f26a
projects/php.projeny is a URL-based projeny project for the php.net release tarball. The patch, ported from filnix's PHP 8.4 port, keeps capabilities that PHP and ext/dom's lexbor round-trip through integers (weak references, WeakMap keys, typed-property source lists, lexbor name IDs, C14N/schema namespace fixups), replaces inline assembly Fil-C cannot run or compile (wordwise string compare, zend_safe_address, the asm goto overflow arithmetic whose callbr crashes FilPizlonatorPass, raw xgetbv bytes, .debug_gdb_scripts), measures the Zend stack limit of ucontext fibers from their first frame, and maps opcache's cache privately (capabilities are per process, so a pointer one FPM worker caches is unusable in another) without the MAP_32BIT huge-page remap.
build_php.sh builds CLI, CGI, FPM and phpdbg plus opcache, intl, dom, gd, mbstring, curl, openssl, sqlite and friends, with the PCRE and opcache JITs and the fiber assembly disabled, then runs a smoke test of the patched areas. It runs from build_glibc_extras.sh because Fil-C's ucontext (needed by --disable-fiber-asm) is only in user glibc; under musl the link fails on pizlonated_swapcontext.
Amp-Thread-ID: https://ampcode.com/threads/T-01a15d2c-1d54-71bb-9384-cdd1921c2969 Co-authored-by: Amp amp@ampcode.com
mbrock
commented
Oct 21, 2026
Copy link
Copy Markdown
Author
This is entirely the work of Opus 5.5 in the Amp harness.
I’m using Kimi K3 now to see if the recent urgent PHP CVEs are thwarted by Fil-C.
The Fil-PHP works with or without the Zend custom allocator. With their allocator, the PHP is faster but less granular in its memory safety.
There was an error while loading. Please reload this page.
php: default to the tracked system allocator
…
18e0199
Zend's allocator carves request memory out of 2 MiB chunks, so Fil-C bounds a PHP value only by its chunk and reuses freed values' memory inside it. The var_destroy use after free in unserialize() runs to completion on Zend's allocator and panics on the system allocator. Default to PHP's tracked system allocator (the one its ASan CI uses) so memory_limit keeps working; USE_ZEND_ALLOC=1 restores Zend's. Under Fil-C, leave the tracked allocator's end-of-request frees (by integer keys, which carry no capability) to the collector, and record peaks for memory_get_peak_usage().
Per-value bounds exposed zend_str_tolower_dup_ex() and zend_str_toupper_dup_ex() writing the copy through the source string's capability, which broke strip_tags() and Dom attribute lookups; offset the copy instead.
Core tests: 15027 pass, pcntl_unshare_02 fails as before; opcache 859 of 860 (gh9164, as before).
Amp-Thread-ID: https://ampcode.com/threads/T-01a15ce7-1e2f-76ab-8c1e-fb4f3eacb8ac Co-authored-by: Amp amp@ampcode.com
pizlonator
approved these changes
Oct 21, 2026
View reviewed changes
pizlonator
left a comment
Copy link
Copy Markdown
Owner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was an error while loading. Please reload this page.
Hide details View details
pizlonator
merged commit 40d5fe7 into
pizlonator:deluge
Oct 21, 2026
5 checks passed
Uh oh!
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。