Stream: t-compiler/wg-llvm

Topic: Stack clash protection


RalfJ (Oct 15 2019 at 10:54, on Zulip):

https://lists.llvm.org/pipermail/llvm-dev/2019-October/135786.html
Isn't this something Rust already does? Why do they need to touch codegen to make this happen in clang?

rkruppe (Oct 15 2019 at 10:58, on Zulip):

Looking at the description of the linked patch, it seems to use the same mechanism we use (probe-stack), just extended to use an inlined code sequence instead of a function call. I don't know why this is necessary, perhaps they can't assume that such a function is available? (e.g. if using clang with libgcc)

nagisa (Oct 15 2019 at 12:00, on Zulip):

Reading the patch the author wants to avoid probing where unnecessary (i.e. where the otherwise generated code would probe by itself?)

cuviper (Oct 18 2019 at 00:31, on Zulip):

I think Rust also only does this for arm and x86, but Serge eventually wants to reach at least all arches that Fedora uses

RalfJ (Oct 19 2019 at 09:18, on Zulip):

if they do, can Rust benefit from that as well? would be good to have more arches covered :D

rkruppe (Oct 19 2019 at 09:24, on Zulip):

Presumably, since AFAIK the limiting factor for rustc's stack probing is porting the assembly code that does the probing and backend support for inserting the probing in functions, both of which they would also have to solve for Clang.

Last update: Nov 15 2019 at 10:50UTC