[Mlir-commits] [mlir] MLIR: asan: Fix python tests under asan on Linux (PR #123303)
Matthias Gehre
llvmlistbot at llvm.org
Tue Jan 28 09:12:34 PST 2025
================
@@ -247,7 +262,9 @@ def find_real_python_interpreter():
# TODO: detect Windows situation (or mark these tests as unsupported on these platforms).
if "asan" in config.available_features:
if "Linux" in config.host_os:
- python_executable = f"LD_PRELOAD=$({config.host_cxx} -print-file-name=libclang_rt.asan-{config.host_arch}.so) {config.python_executable}"
+ python_executable = (
+ f"env LD_PRELOAD={get_asan_rtlib()} {config.python_executable}"
----------------
mgehre-amd wrote:
The LD_PRELOAD breaks all binary that LLVM has build with asan (like mlir-opt) because those already statically link the asan runtime library. We must only use LD_PRELOAD for `python`.
https://github.com/llvm/llvm-project/pull/123303
More information about the Mlir-commits
mailing list