[PATCH] D68720: Support -fstack-clash-protection for x86

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 15:39:49 PDT 2019


efriedma added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:423
+                               AbsOffset - CurrentAbsOffset + PageSize);
+        if (FreeProbeIterator != MBB.end()) {
+          NumFrameFreeProbe++;
----------------
Each probe has to have an offset of at most PageSize bytes from the previous probe.  If each probe is exactly PageSize bytes away from the previous probe, that's fine.  But it looks like you don't enforce the distance between free probes correctly?


================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:481
+                    [](MachineOperand &MO) { return MO.isFI(); })) {
+      break; // effect on stack pointer not modelled, stopping
+    }
----------------
There are instructions that don't refer to any FI, but are still relevant.  For example, calls.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68720





More information about the cfe-commits mailing list