[PATCH] D56672: [HWASAN] Instrument globals

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 18:50:24 PDT 2019


pcc added a comment.

In D56672#1506944 <https://reviews.llvm.org/D56672#1506944>, @evgeny777 wrote:

> > Could this use a relative relocation so that we aren't paying the cost of a dynamic relocation for each global?
>
> @pcc Sorry I missed your comment
>
> I think this is not possible to do for shared objects, because GVs could be preempted.


I think it should be possible if you make the relocation point to the object itself (which will have local linkage) and not the alias that you're creating. Of course you'll need to add the tag to the address in the same way as when you create the alias.

> Still this looks possible for executables where I can set
>  visibility of instrumented globals to hidden. I'll try this out




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56672/new/

https://reviews.llvm.org/D56672





More information about the llvm-commits mailing list