Skip to content

fix: search an empty PATH entry from RPATH wrappers - #327

Open
HaoZeke wants to merge 1 commit into
mainfrom
fix/rpath-empty-path-entry
Open

HaoZeke wants to merge 1 commit into
mainfrom
fix/rpath-empty-path-entry

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

The wrapper looked up the real compiler with bash read. read drops
a trailing colon, and the loop passed over an empty entry, so the
wrapper never searched the current directory. It reported a
compiler that is only in the current directory as missing, and it
ran a later copy when the current directory came first on PATH.

An empty PATH entry is the current directory, including the entry
a trailing colon names. execvp searches it, and rpath-wrappers
already finds a compiler there through proc.which. The wrapper now
splits PATH on colons and keeps every entry. An unset PATH still
uses /bin:/usr/bin, the default command search path.

The wrapper looked up the real compiler with bash read. read drops
a trailing colon, and the loop passed over an empty entry, so the
wrapper never searched the current directory. It reported a
compiler that is only in the current directory as missing, and it
ran a later copy when the current directory came first on PATH.

An empty PATH entry is the current directory, including the entry
a trailing colon names. execvp searches it, and rpath-wrappers
already finds a compiler there through proc.which. The wrapper now
splits PATH on colons and keeps every entry. An unset PATH still
uses /bin:/usr/bin, the default command search path.
@HaoZeke HaoZeke changed the title The wrapper looked up the real compiler with bash read. read drops fix: search an empty PATH entry from RPATH wrappers Nov 19, 2026

This branch has not been deployed

No deployments
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