[compiler-rt] [sanitizer_common] posix_spawn test should forward DYLD_LIBRARY_PATH (PR #168795)
Andrew Haberlandt via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 17:10:00 PST 2025
ndrewh wrote:
@boomanaiden154 Without DYLD_LIBRARY_PATH, the spawned process can use a ASAN runtime other than the one that was just built. That other runtime library may not work at all, or may not be in the default search path. Either case can cause the spawned process to die before it makes it to `main`, thus failing the test.
The specific use-case is `%run` wrappers which can copy the test and libraries to a remote device and run with DYLD_LIBRARY_PATH set. However, I _think_ this test could also cause issues with any standalone compiler-rt build, since DYLD_LIBRARY_PATH ensures that just-built runtimes are used rather than those in your compiler's resource directory.
I fucked up in my original patch since I lost the `DYLD_LIBRARY_PATH=` part. I've fixed that and now just walk `environ` directly.
https://github.com/llvm/llvm-project/pull/168795
More information about the llvm-commits
mailing list