On 23/09/2019 08:52, Martin Liška wrote: > On 9/20/19 7:11 PM, Matthew Malcomson wrote: >> The implementation is unlikely to be production-quality since >> development on libhwasan is only on its `platform` ABI. This libhwasan >> ABI requires changes to the system libc so that it calls into libhwasan >> on interesting events. >> I haven't looked into adding these changes to glibc, but expect that >> most people running a Linux distribution would not want to install a >> special glibc to use this sanitizer. > > Can you please provide a link about what special one needs in glibc > to support HWASAN?
i don't know if there is such a link other than taking a hint from the internal api in the source https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/hwasan/hwasan_interface_internal.h memory has to be (un)tagged on (de)allocation, which requires libc help to know the limits and when the (de)allocation happens in case of tls/stack memory (e.g. dealloced at unwind, longjmp, setcontext, thread exit, thread cancel, child exit after vfork) and in case of global data in dynamically loaded shared libs.