mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
Swift: disable stack protection in extractor to fix Linux crash
The FunctionStackProtection SIL pass crashes on Linux when processing standard library functions like withUnsafePointer(to:_:). This is a known upstream Swift compiler bug (swiftlang/swift#69768). The extractor does not need stack protection since it only extracts semantic information from the AST and never produces executable code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -81,6 +81,9 @@ static void turnOffSilVerifications(swift::SILOptions& options) {
|
||||
options.VerifyExclusivity = false;
|
||||
options.VerifyNone = true;
|
||||
options.VerifySILOwnership = false;
|
||||
// Stack protection is not needed for extraction and causes a crash on Linux
|
||||
// (https://github.com/swiftlang/swift/issues/69768)
|
||||
options.EnableStackProtection = false;
|
||||
}
|
||||
|
||||
codeql::TrapDomain invocationTrapDomain(codeql::SwiftExtractorState& state);
|
||||
|
||||
Reference in New Issue
Block a user