Commit 090612b
committed
fix: use -fno-trampolines to replace stack trampolines with register-based ones
The previous approach (-Wl,-z,noexecstack only) caused SIGSEGV during FT8 decode
because the WSJT-X Fortran code uses internal procedure pointers at runtime which
require trampolines. With the stack non-executable, those trampolines segfaulted.
This commit uses a two-part fix:
1. -fno-trampolines (Fortran compile flag): instructs gfortran to use register-based
trampolines instead of stack-based ones. GCC 9+ / aarch64 supports this natively.
2. -Wl,-z,noexecstack (linker flag): marks the SO as not requiring executable stack,
which is now safe since trampolines no longer live on the stack.
If the Fortran code has nested procedure arguments that cannot use register trampolines,
CI will fail at compile or test time, indicating code restructuring is needed.1 parent e9be6ec commit 090612b
3 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments