Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Include LD_LIBRARY_PATH iff set by command #1933

Merged
merged 3 commits into from
May 13, 2022

Conversation

ranweiler
Copy link
Member

@ranweiler ranweiler commented May 11, 2022

On Linux, when calling find_missing(), include LD_LIBRARY_PATH if and only if the invoked Command explicitly sets some value for that variable. This ensures consistent search results, no matter the process environment of the calling context.

Closes #1827.

  • Tested locally by invoking dynamic-library with and without LD_LIBRARY_PATH set in env, set via flag
  • Tested remotely by submitting job to OneFuzz deployment
    • Shared lib in {setup_dir} (passes no matter what, because we default to LD_LIBRARY_PATH={setup_dir})
    • Shared lib in {setup_dir}/lib, no target_env (fails)
    • Shared lib in {setup-dir}/lib, with --target_env LD_LIBRARY_PATH={setup_dir}/lib (passes)

@ranweiler ranweiler requested review from chkeita and tevoinea May 11, 2022 23:03
@ranweiler ranweiler merged commit e2314b1 into microsoft:main May 13, 2022
@ranweiler ranweiler deleted the find-missing-ld-library-path branch May 13, 2022 15:48
@ghost ghost locked as resolved and limited conversation to collaborators Jun 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linux missing shared library search doesn't include LD_LIBRARY_PATH
3 participants