[compiler-rt] [compiler-rt] Fix SetAlternateSignalStack return type for GCC 15.2.0 (PR #202094)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 07:14:23 PDT 2026


clearnature wrote:

> Is it necessary to fix the build failure or not?

Yes — the functional fix is necessary. My earlier explanation was
unclear — let me clarify the history:

The original PR mixed two changes:
1. \`void*\` → \`void *\` (style-only, unnecessary)
2. \`return nullptr\` → \`return oldstack.ss_sp\` (functional fix)
   and \`altstack.ss_sp = nullptr\` → \`altstack.ss_sp = altstack_base\`
   (honest fix — parameter was ignored)

The whitespace changes violated the directory's Google-style
.clang-format and were reverted. The functional fix remains and is
required for GCC 15.2.0 on Ubuntu 26.04.

The issue: \`SetAlternateSignalStack()\` declares a \`void*\` return
type but returned \`nullptr\` when the alt stack is already set.
GCC 15 rejects this mismatch. The fix returns \`oldstack.ss_sp\`
(the existing stack pointer) which matches the return type.

Updated PR description to reflect the real scope.

https://github.com/llvm/llvm-project/pull/202094


More information about the llvm-commits mailing list