[PATCH] D64971: [SafeStack] Don't re-insert derefs for allocas in debug info

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 09:50:41 PDT 2019


jmorse added a comment.

This sounds similar to PR41675 -- sometimes the DWARF expression builder interprets a DW_OP_deref as an extra dereference, other times it interprets it as confirmation that the expression being built is a memory location.

I think this fix might not work with expressions that already has a DW_OP_stack_value in them. The change relies on the expression eventually being a DWARF memory location (and thus always involving a dereference); but if the rest of the original DIExpr has a stack_value in it, the expression will be an implicit location, and the desired dereference won't happen.

Another fix might be to keep the dereference, but always try to add a stack_value to the expression, to make it explicitly implicit? [Ooof].


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64971





More information about the llvm-commits mailing list