llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[hwasan] LD_PRELOAD=$(absolute_path)/libclang_rt.hwasan-aarch64.so + ls (Bad address)

Open Neilzhangtianhao opened this issue 4 years ago • 2 comments

LLVM Version: 9.0.1 compiler-rt version: 9.0.0 backport: aarch64

Use Case:

LD_PRELOAD=$(absolute_path)/libclang_rt.asan-aarch64.so ls

it's ok when I use:

LD_PRELOAD=$(absolute_path)/libclang_rt.hwasan-aarch64.so ls

it return error:

ls: cannot open directory '.': Bad address

I want to know if I use a wrong method for libclang_rt.hwasan-aarch64.so or it not support LD_PRELOAD=$(absolute_path)/libclang_rt.hwasan-aarch64.so + shell basic commands

Neilzhangtianhao avatar Apr 24 '22 02:04 Neilzhangtianhao

@llvm/issue-subscribers-backend-aarch64

llvmbot avatar Apr 24 '22 03:04 llvmbot

I don't think you can expect this to work for arbitrary binaries. The instrumented allocation functions return tagged pointers, but the binary might assume that pointers are canonical, i.e. with upper bits zero. It might use those bits to store other information.

aaronpuchert avatar Mar 05 '26 15:03 aaronpuchert