[PATCH] D63119: hwasan: Add a tag_offset DWARF attribute to instrumented stack variables.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 11:58:08 PDT 2019


pcc added a comment.

> Can you please add this to either LangRef.rst or SourceLevelDebugging.rst

Done.

> and also explain how this operation composes with other DIExpressions? I'm thinking particularly about DW_OP_LLVM_fragment.

I think this composes quite naturally with other expressions that operate on pointers. Basically you can think of DW_OP_LLVM_tag_offset as adding a large value `(base ^ tag_offset) << 56` to the pointer. Being an addition operation this is clearly commutative with other operations such as DW_OP_LLVM_fragment that also add values to the pointer.

> This also needs an assembler round-trip-test

Done.

> and probably some checks in Verifier.cpp.

Hmm, I'm not sure what else we need aside from the existing `isValid()` check in `Verifier::visitDIExpression`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63119





More information about the llvm-commits mailing list