[PATCH] D77767: Prevent stack coloring functions whith setjmp / longjmp

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 16:35:14 PDT 2020


efriedma added a subscriber: rnk.
efriedma added a comment.

> From my understanding, when we join variables with disjoint aliveness, one from before and the other after the long, changing the "pointer" to this new joined variable is dangerous. If it is spilled, it won't be restored by the longjmp.

You're saying the problem is the address of the local variable, not its contents?  In that case, this patch is almost certainly covering up the real problem; an equivalent "merging" transform can be done at the source level.  And it's probably feasible to hit related issues in other ways.

My best guess based on your description is that greedy regalloc isn't being conservative enough about its use of spill slots in functions that call setjmp.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77767





More information about the llvm-commits mailing list