[PATCH] D88988: [llvm-symbolizer] Add inline stack traces for Windows.

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 16:34:12 PDT 2020


akhuang added a comment.

In D88988#2348560 <https://reviews.llvm.org/D88988#2348560>, @rnk wrote:

> Wow, that is some interesting code. :) That explains what is going on: we get the current PC, then we do a stack unwind later (inside the inline call frame), then we take the PC, and truncate the stack trace with it. The return address in the stack trace actually *is* inside the inlined call site, so this code never would've worked with inline line info.
>
> I think this can be fixed by modifying the stack trace in place, after popping off the extra stack frames. After this line:
> https://github.com/llvm/llvm-project/blob/1882568fcb08ed8af689f13826cc7e84c3c84e33/compiler-rt/lib/sanitizer_common/sanitizer_unwind_win.cpp#L39
> ... overwrite the first PC in the stack trace with `pc`. It could work. :)

Oh yeah, I guess that would work. Anyway, seems like all the tests still pass.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88988



More information about the llvm-commits mailing list