-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.crashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Description
the given example crashes. removing either of the sending
or @escaping
parameter attributes seems to prevent the crash.
Reproduction
func example(
_ operation: sending @escaping @isolated(any) () async -> Void
) {
_ = operation.isolation
}
Stack dump
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /opt/compiler-explorer/swift-6.1/usr/bin/swift-frontend -frontend -emit-silgen -primary-file <source> -target x86_64-unknown-linux-gnu -disable-objc-interop -g -debug-info-format=dwarf -dwarf-version=4 -swift-version 6 -empty-abi-descriptor -resource-dir /opt/compiler-explorer/swift-6.1/usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /app -Xllvm --x86-asm-syntax=intel -module-name output -in-process-plugin-server-path /opt/compiler-explorer/swift-6.1/usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /opt/compiler-explorer/swift-6.1/usr/lib/swift/host/plugins -plugin-path /opt/compiler-explorer/swift-6.1/usr/local/lib/swift/host/plugins -o /app/output.s
1. Swift version 6.1 (swift-6.1-RELEASE)
2. Compiling with the current language version
3. While evaluating request ASTLoweringRequest(Lowering AST to SIL for file "<source>")
4. While silgen emitFunction SIL function "@$s6output7exampleyyyyYaYAcnF".
for 'example(_:)' (at <source>:1:1)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x0000593f6863d7d8
1 swift-frontend 0x0000593f6863b57e
2 swift-frontend 0x0000593f6863de7d
3 libc.so.6 0x000075ad9ec42520
4 swift-frontend 0x0000593f633e2399
*** Signal 5: Backtracing from 0x593f633e239a... done ***
*** Program crashed: System trap at 0x0000000000000000 ***
Thread 0 "swift-frontend" crashed:
0 0x0000593f633e239a (anonymous namespace)::TypeClassifierBase<(anonymous namespace)::LowerType, swift::Lowering::TypeLowering*>::visit(swift::CanType, swift::Lowering::AbstractionPattern, swift::Lowering::IsTypeExpansionSensitive_t) + 1210 in swift-frontend
Registers:
rax 0x0000593f633e2398 cc cc cc cc cc cc cc cc 55 41 57 41 56 41 55 41 ÌÌÌÌÌÌÌÌUAWAVAUA
rdx 0x0000593f9bbc3278 50 2a 8e 9b 3f 59 00 00 36 20 00 08 00 00 00 00 P*··?Y··6 ······
rcx 0x0000593f68ffab78 34 76 3e fa 20 78 3e fa 20 78 3e fa 48 76 3e fa 4v>ú x>ú x>úHv>ú
rbx 0x0000000000000000 0
rsi 0x00007fff9dbead78 80 f3 0d 98 ad 75 00 00 18 f4 0d 98 ad 75 00 00 ·ó··u···ô··u··
rdi 0x00007fff9dbeadd0 00 2c 8e 9b 3f 59 00 00 78 32 bc 9b 3f 59 00 00 ·,··?Y··x2¼·?Y··
rbp 0x0000000000000000 0
rsp 0x00007fff9dbead70 70 af be 9d ff 7f 00 00 80 f3 0d 98 ad 75 00 00 p¯¾·ÿ····ó··u··
r8 0x0000000000000009 9
r9 0x0000593f9b8e2c00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ················
r10 0x0000593f9bbc3278 50 2a 8e 9b 3f 59 00 00 36 20 00 08 00 00 00 00 P*··?Y··6 ······
r11 0x0000000000000000 0
r12 0x000075ad980df380 70 b7 bf 9b 3f 59 00 00 30 c6 bf 9b 3f 59 00 00 p·¿·?Y··0Æ¿·?Y··
r13 0x0000593f9bbc3278 50 2a 8e 9b 3f 59 00 00 36 20 00 08 00 00 00 00 P*··?Y··6 ······
r14 0x00007fff9dbeae18 80 f3 0d 98 ad 75 00 00 01 00 00 00 00 00 00 00 ·ó··u··········
r15 0x00007fff9dbeadd0 00 2c 8e 9b 3f 59 00 00 78 32 bc 9b 3f 59 00 00 ·,··?Y··x2¼·?Y··
rip 0x0000593f633e239a cc cc cc cc cc cc 55 41 57 41 56 41 55 41 54 53 ÌÌÌÌÌÌUAWAVAUATS
rflags 0x0000000000000203 CF
cs 0x0033 fs 0x0000 gs 0x0000
Images (28 omitted):
0x0000593f60c20000–0x0000593f6870cc00 0bcdc9344aa7f288f7fabe97915174f9f4d697b1 swift-frontend /opt/compiler-explorer/swift-6.1/usr/bin/swift-frontend
Backtrace took 0.42s
Program terminated with signal: SIGTRAP
Compiler returned: 133
Expected behavior
appropriate code should be generated
Environment
Swift version 6.1 (swift-6.1-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional information
compiler explorer example: https://swift.godbolt.org/z/5hfhqvanM
per compiler explorer, appears to affect 6.0, 6.1, 6.2-dev, & main
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.crashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labelsThis issue needs more specific labels