[RFC][PATCH 6/X][libsanitizer] Add -fsanitize=hwaddress flags

Matthew Malcomson Matthew.Malcomson@arm.com
Mon Sep 9 10:18:00 GMT 2019


On 09/09/19 11:06, Martin Liška wrote:
> On 9/6/19 4:46 PM, Matthew Malcomson wrote:
>> This flag can't be used at the same time as any of the other sanitizers.
>> We add an equivalent flag to -static-libasan in -static-libhwasan to
>> ensure static linking.
> 
> Hello.
> 
> You're introducing new option argument -fsanitize=hwaddress. However,
> clang is using 'hwasan':
> https://github.com/llvm-mirror/clang/blob/master/lib/Driver/ToolChains/CommonArgs.cpp#L625
> 
> I would align it with the existing clang's option.
> 
> Thanks,
> Martin
> 

Hi there,

I don't believe that's where this particular option is defined.
I think it's here.
https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/Sanitizers.def#L53

I took the `hwaddress' argument from what my local build of clang accepted.

(Helpfully enough, finding that option also shows the option that clang 
uses for the AArch64 memtag extension, which I've been meaning to get 
around to finding for a while ;-] )

Cheers,
Matthew.



More information about the Gcc-patches mailing list