Skip to content

sapi/phpdbg: restore the DEFAULT_SLASH check on the module path - #23583

Open
darkdi wants to merge 1 commit into
php:masterfrom
darkdi:phpdbg-default-slash
Open

sapi/phpdbg: restore the DEFAULT_SLASH check on the module path#23583
darkdi wants to merge 1 commit into
php:masterfrom
darkdi:phpdbg-default-slash

Conversation

@darkdi

@darkdi darkdi commented Sep 5, 2026

Copy link
Copy Markdown

Before GH-21578 this guard read strchr(*path, '/') || strchr(*path, DEFAULT_SLASH). The rewrite onto memchr() kept the first half and copied it into the second, so both now look for '/', and the DEFAULT_SLASH half is gone. On Windows that means ext C:\path\php_foo.dll is not treated as a path at all, extension_dir gets glued in front of it and the load fails. ext/standard/dl.c still has the pair intact, which is what the phpdbg code was written from. Only master carries this, 8.4 and 8.5 still have the strchr version, and I have not touched the NEWS file since nothing released is affected.

Disclosure per CONTRIBUTING: the paragraph above was drafted with an LLM (Claude Code). The finding came from a static check of my own and I read the code and the history by hand.

🤖 Generated with Claude Code

The move to memchr() in phpGH-21578 left both halves of the condition looking
for '/', so on Windows a path given with backslashes is not recognised as a
path and extension_dir gets prepended to it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.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