Skip to content

Fix GH-25742: huge_code_pages program section not found on musl - #25824

Open
lazerg wants to merge 1 commit into
php:PHP-8.5from
lazerg:fix/gh-25742
Open

lazerg wants to merge 1 commit into
php:PHP-8.5from
lazerg:fix/gh-25742

Conversation

@lazerg

@lazerg lazerg commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Fixes GH-25742.

accel_dl_iterate_phdr_callback() took the first dl_iterate_phdr() entry with an empty name as the main executable. That holds on glibc, but musl reports the main program with its path, and the only entry with an empty name is the vDSO. The section headers from /proc/self/exe were then offset by the vDSO base, so opcache.huge_code_pages=1 warned "program section not found" on Alpine and never remapped anything.

The callback now picks the object whose PT_LOAD segment contains the callback itself, as suggested in the issue. I checked it on alpine:3.22 (the warning is gone and the text segment is remapped) and on debian:12 (same behaviour as before).

Co-authored-by: Krzysztof Surdy <68391139+krzysztofsurdy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant