[flang-commits] [flang] [flang][docs] Add a mention about -fsafe-trampoline to FAQ.md (PR #207656)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Mon Jul 6 08:06:50 PDT 2026
================
@@ -50,3 +50,7 @@ ld.lld: error: src.o: requires an executable stack, but -z execstack is not spec
flang-22: error: linker command failed with exit code 1 (use -v to see invocation)
$ flang src.f90 -fuse-ld=lld -Wl,-z,execstack
```
+
+Since LLVM 23, Flang has a new compiler flag `-fsafe-trampoline`, which is disabled by default.
+If this is enabled, the trampoline is generated on a dedicated `mmap`'d region instead of the stack.
+Therefore, we **strongly recommend** using this flag to reduce the security risk.
----------------
tarunprabhu wrote:
If we want to "strongly recommend" using this option, should we just turn it on by default on platforms where it is supported?
I like the suggestion that @Saieiei has made. One difference in his text is that the word "strongly" is not used. I am not sure if this is an oversight, or if the intention is to avoid making a strong recommendation.
https://github.com/llvm/llvm-project/pull/207656
More information about the flang-commits
mailing list