This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question on direction of GCC support for HWASAN.

On Tue, Sep 24, 2019 at 9:36 AM Szabolcs Nagy <> wrote:
> 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
> 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.

This is a slightly better link, but it misses
__hwasan_library_(load|unload) hooks:

You can also search bionic source for __hwasan and __sanitizer:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]