Release build crashes the compiler on Linux since #389 (RCodesign)

未关闭
#431 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@c4software 已经在做这个了。

开始于 2026年11月6日。

  • #432 来自 @c4software —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
linux, swift

调研方向

Start with the release build command in the issue: swift build -c release --target XKit, using the swift:6.4.2-jammy image and commit ac40282. Compare the first bad commit, 64fe8e3, with its parent and inspect the reported DeveloperServicesAddAppGroupRequest.o compiler crash. Done when the Linux release build completes without the compiler crash; the issue leaves the triggering change unknown.

由索引模型根据 Issue 内容生成。

描述

Since #389 (zsign replaced by RCodesign), a release build of XKit crashes the Swift compiler on Linux x86_64. Upstream CI builds debug only (build.yml), so it does not show there; the next tagged Linux release (release.yml) would hit it.

Reproduce (upstream's own image: the build-limd stage of the Dockerfile at ac40282, on swift:6.4.2-jammy)

git checkout ac40282
swift build -c release --target XKit
*** Program crashed: Bad pointer dereference at 0x… ***
Running pass "require<globals-aa>,function(invalidate<aa>),…" on module ".../XKit-t.build/Objects-normal/x86_64/DeveloperServicesAddAppGroupRequest.o"
error: Build failed

The crashing threads are in LLVM: Verifier::visitFunction, AttributeList::hasAttributeAtIndex, CodeGenPrepare::optimizeCallInst, KnownBits::getMaxValue. The other XKit objects of that batch then fail with error closing '….o' … No such file or directory.

Bisect (git bisect run between 1.24.0 (good) and ac40282 (bad), release build of the xtool product)

  • First bad commit: 64fe8e3, "signer: replace zsign with RCodesign (#389)".
  • Its parent, 03fb48c (#412), builds.

Same result

  • with Swift 6.4.1 and 6.4.2;
  • with SwiftBuild (the default) and --build-system native;
  • with -Xswiftc -num-threads -Xswiftc 0;
  • in upstream's image above, and in an Arch container (swift.org ubi9 toolchains).

A debug build works.

Not checked

  • arm64 hosts.
  • macOS.
  • Which part of #389 sets it off. The crash is reported on DeveloperServicesAddAppGroupRequest.o, a file #389 does not touch, so it may come from cross-module optimization of the new signer code.
主要语言
Swift
星标
5.5k
派生
163
平均合并
1 天 12 小时
30 天内合并 PR
32

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

xtool-org/xtool 的其他 Issue

查看 xtool-org/xtool 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。