我注意到当我设置 LD_PRELOAD 环境时。变量 libclang_rt.asan-x86_64.so pgrep 挂起。
为什么会发生这种情况以及如何避免这种情况?
senx:/$ time pgrep anything
real 0m0,022s
user 0m0,001s
sys 0m0,020s
senx:/$ export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.4
senx:/$ time pgrep anything
real 0m0,076s
user 0m0,033s
sys 0m0,027s
senx:/$ export LD_PRELOAD=/usr/lib/llvm-10/lib/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.so
senx:/$ time pgrep anything
^C
real 0m33,077s
user 0m0,010s
sys 0m0,010s