Skip to content

Conversation

@kavon
Copy link
Member

@kavon kavon commented Oct 24, 2025

Explanation: Instructions that are not returns can be annotated with the SILLocation::ReturnKind, which is not permitted by SILInstruction::verifyDebugInfo, which only runs in assertion builds.
Scope: Anyone using a nightly 6.2 compiler, which is built with asserts, cannot build their project if it contains certain constructs using ~Copyable types.
Issues: rdar://163281183
Original PRs: #85119
Risk: Low.
Testing: Manual testing within a configuration that would reproduce the crash 100% of the time. Patch resolves that crash.
Reviewers: @jckarter

We were reusing the SILLocation from return instructions
to generate projections to ultimately destroy values.

This fix improves on what we were doing before, by
converting the insertion point's SILLocation into a
RegularLocation _without dropping_ the source location.

If the SILLocation was tied to an ASTNode, it'll carry
over the line location for this new regular location.
Otherwise, it'll fallback to the prior strategy of
producing a line 0 autogenerated location.

resolves rdar://163281183

(cherry picked from commit fd06bb1)
@kavon kavon requested a review from a team as a code owner October 24, 2025 19:08
@kavon
Copy link
Member Author

kavon commented Oct 24, 2025

@swift-ci test

@kavon kavon changed the title DebugInfo: fix FSPL SILLocation assertion issue [6.2] DebugInfo: fix FSPL SILLocation assertion issue Oct 24, 2025
@kavon kavon enabled auto-merge October 25, 2025 00:08
@kavon
Copy link
Member Author

kavon commented Oct 25, 2025

[2025-10-25T00:09:26.756Z] ******************** TEST 'lldb-api :: lang/swift/async/actors/unprioritised_jobs/TestSwiftActorUnprioritisedJobs.py' FAILED ********************
[2025-10-25T00:09:26.756Z] Script:
[2025-10-25T00:09:26.756Z] --
[2025-10-25T00:09:26.756Z] /Users/ec2-user/jenkins/workspace/swift-PR-macos/venv/bin/python3.9 /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --inferior-env DYLD_LIBRARY_PATH="/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/swift-macosx-x86_64/lib/swift/macosx:/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/./lib/lldb/clang/lib/darwin" --inferior-env LD_LIBRARY_PATH="/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/swift-macosx-x86_64/lib/swift/x86_64" --inferior-env SIMCTL_CHILD_DYLD_LIBRARY_PATH="/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/swift-macosx-x86_64/lib/swift/macosx" --env OBJCOPY=/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/./bin/llvm-objcopy --out-of-tree-debugserver --env LLVM_LIBS_DIR=/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/./lib --env LLDB_LIBS_DIR=/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/./lib --env LLVM_INCLUDE_DIR=/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/include --env LLVM_TOOLS_DIR=/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/./bin --libcxx-include-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/libcxx-macosx-x86_64/include/c++/v1 --libcxx-library-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/libcxx-macosx-x86_64/lib --arch x86_64 --build-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex --lldb-module-cache-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex/module-cache-clang/lldb-api --swift-libs-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/swift-macosx-x86_64/lib/swift --executable /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/./bin/lldb --compiler /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/./bin/clang --swift-compiler /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/swift-macosx-x86_64/bin/swiftc --dsymutil /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/./bin/dsymutil --make /usr/bin/make --llvm-tools-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/./bin --lldb-obj-root /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64 --lldb-libs-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/./lib --framework /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/bin/LLDB.framework --skip-category=swiftmaccatalyst --build-dir /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/lldb-macosx-x86_64/lldb-test-build.noindex --skip-category=watchpoint --skip-category=dwo --setting symbols.use-swift-clangimporter=false /Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/llvm-project/lldb/test/API/lang/swift/async/actors/unprioritised_jobs -p TestSwiftActorUnprioritisedJobs.py
[2025-10-25T00:09:26.756Z] --
[2025-10-25T00:09:26.756Z] Exit Code: -9
[2025-10-25T00:09:26.756Z] Timeout: Reached timeout of 600 seconds
[2025-10-25T00:09:26.756Z] 
[2025-10-25T00:09:26.756Z] Command Output (stdout):
[2025-10-25T00:09:26.756Z] --
[2025-10-25T00:09:26.756Z] lldb version 17.0.0 (https://github.com/swiftlang/llvm-project.git revision 9d05187c050d7daa776def7f6ca06334569c03df)
[2025-10-25T00:09:26.756Z] Apple Swift version 6.2-dev (LLVM 9d05187c050d7da, Swift a4dc0d5406423cc)
[2025-10-25T00:09:26.756Z] 
[2025-10-25T00:09:26.756Z] --
[2025-10-25T00:09:26.756Z] Command Output (stderr):
[2025-10-25T00:09:26.756Z] --
[2025-10-25T00:09:26.756Z] PASS: LLDB (/Users/ec2-user/jenkins/workspace/swift-PR-macos/branch-release/6.2/build/buildbot_incremental/llvm-macosx-x86_64/bin/clang-x86_64) :: test_actor_unprioritised_jobs_dsym (TestSwiftActorUnprioritisedJobs.TestCase)
[2025-10-25T00:09:26.756Z] 
[2025-10-25T00:09:26.756Z] --
[2025-10-25T00:09:26.756Z] 
[2025-10-25T00:09:26.756Z] ********************

I wouldn't expect a timeout on this test to be related.

@kavon
Copy link
Member Author

kavon commented Oct 25, 2025

@swift-ci test macOS

@kavon kavon merged commit 8c1cc1b into swiftlang:release/6.2 Oct 25, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants