[LSAN] Add GetUserAddr function which returns the user visible address of an internal...
authorKirill Stoimenov <kstoimenov@google.com>
Wed, 1 Feb 2023 22:00:13 +0000 (22:00 +0000)
committerKirill Stoimenov <kstoimenov@google.com>
Thu, 2 Feb 2023 00:39:00 +0000 (00:39 +0000)
commiteb3be66028eac88098e0186cff80e0421949dd69
treeed3319611d2750ad128eb6b5bdfb141ba6034f6d
parent897e345042cdf2b3c1dffd234d1b593205f69a32
[LSAN] Add GetUserAddr function which returns the user visible address of an internal pointer

For HWASAN this would be the tagged address. It is the same pointer when pointer tagging is not used. Coincidently this also fixes some test which rely on comparing pointers.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D143121
13 files changed:
compiler-rt/lib/asan/asan_allocator.cpp
compiler-rt/lib/hwasan/hwasan_allocator.cpp
compiler-rt/lib/lsan/lsan_allocator.cpp
compiler-rt/lib/lsan/lsan_common.cpp
compiler-rt/lib/lsan/lsan_common.h
compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cpp
compiler-rt/test/lsan/TestCases/Linux/use_tls_static.cpp
compiler-rt/test/lsan/TestCases/pointer_to_self.cpp
compiler-rt/test/lsan/TestCases/use_after_return.cpp
compiler-rt/test/lsan/TestCases/use_globals_initialized.cpp
compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp
compiler-rt/test/lsan/TestCases/use_stacks.cpp
compiler-rt/test/lsan/TestCases/use_unaligned.cpp