Skip to content

Crash on non-existent file #1704

@rjmansfield

Description

@rjmansfield
$ ~/swift-6.0.1-RELEASE-ubuntu22.04/usr/bin/swiftc nosuchfile

💣 Program crashed: Signal 11: Backtracing...

Debugging will be degraded due to missing types. Rebuilding the project will regenerate the needed module files.
* thread #1, name = 'swiftc', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x00005555559760a4 swiftc`(anonymous namespace)::CAPIBuildEngineDelegate::cycleDetected(this=<unavailable>, items=<unavailable>) at Core-C-API.cpp:90:5
    frame #2: 0x00005555559c4efd swiftc`(anonymous namespace)::BuildEngineImpl::executeTasks(llbuild::core::KeyType const&) [inlined] (anonymous namespace)::BuildEngineImpl::resolveCycle(this=0x0000555555d3bbb0, buildKey=0x00007fffffffcca0) at BuildEngine.cpp:1095:14
    frame #3: 0x00005555559c3d1e swiftc`(anonymous namespace)::BuildEngineImpl::executeTasks(this=0x0000555555d3bbb0, buildKey=0x00007fffffffcca0) at BuildEngine.cpp:1061:15
    frame #4: 0x00005555559c033c swiftc`llbuild::core::BuildEngine::build(llbuild::core::KeyType const&) [inlined] (anonymous namespace)::BuildEngineImpl::build(this=0x0000555555d3bbb0, key=<unavailable>) at BuildEngine.cpp:1598:20
    frame #5: 0x00005555559c01a6 swiftc`llbuild::core::BuildEngine::build(this=<unavailable>, key=0x00007fffffffcca0) at BuildEngine.cpp:1934:47
    frame #6: 0x000055555597587d swiftc`llb_buildengine_build(engine_p=<unavailable>, key=<unavailable>, result_out=0x00007fffffffcd10) at Core-C-API.cpp:216:26
    frame #7: 0x00005555559ed04d swiftc`BuildEngine.build(key:) [inlined] closure #1 ($0=<unavailable>, resultPtr=<unavailable>, $0=0x2e, resultPtr=0x0000000000000000) -> () in closure #1 (Swift.UnsafeMutablePointer<__C.llb_data_t_>) -> () in llbuildSwift.BuildEngine.build(key: llbuildSwift.Key) -> llbuildSwift.Value at CoreBindings.swift:407:39 [opt]
    frame #8: 0x00005555559ed03c swiftc`BuildEngine.build(key:) [inlined] generic specialization <()> of reabstraction thunk helper <τ_0_0> from @callee_guaranteed (@unowned Swift.UnsafePointer<__C.llb_data_t_>) -> (@out τ_0_0) to @escaping @callee_guaranteed (@unowned Swift.UnsafePointer<__C.llb_data_t_>) -> (@out τ_0_0, @error @out Swift.Never) at <compiler-generated>:0 [opt]
    frame #9: 0x00005555559ed03c swiftc`BuildEngine.build(key:) [inlined] generic not re-abstracted specialization <()> of reabstraction thunk helper <τ_0_0> from @callee_guaranteed (@unowned Swift.UnsafePointer<__C.llb_data_t_>) -> (@out τ_0_0) to @escaping @callee_guaranteed (@unowned Swift.UnsafePointer<__C.llb_data_t_>) -> (@out τ_0_0, @error @out Swift.Never) at <compiler-generated>:0 [opt]
    frame #10: 0x00005555559ed03c swiftc`BuildEngine.build(key:) [inlined] generic specialization <__C.llb_data_t_, Swift.Never, ()> of Swift.withUnsafePointer<τ_0_0, τ_0_1, τ_0_2 where τ_0_1: Swift.Error, τ_0_0: ~Swift.Copyable, τ_0_2: ~Swift.Copyable>(to: inout τ_0_0, _: (Swift.UnsafePointer<τ_0_0>) throws(τ_0_1) -> τ_0_2) throws(τ_0_1) -> τ_0_2 at <compiler-generated>:0 [opt]
    frame #11: 0x00005555559ed03c swiftc`BuildEngine.build(key:) at CoreBindings.swift:63:20 [opt]
    frame #12: 0x00005555559ed034 swiftc`BuildEngine.build(key:) [inlined] generic specialization <Swift.UInt8, ()> of Swift.Array.withUnsafeBufferPointer<τ_0_0>((Swift.UnsafeBufferPointer<τ_0_0>) throws -> τ_1_0) throws -> τ_1_0 at <compiler-generated>:0 [opt]
    frame #13: 0x00005555559ed02c swiftc`BuildEngine.build(key:) [inlined] generic specialization <()> of llbuildSwift.Key.withInternalDataPtr<τ_0_0>() -> τ_0_0) -> τ_0_0 at CoreBindings.swift:61:21 [opt]
    frame #14: 0x00005555559ed02c swiftc`BuildEngine.build(key:) [inlined] closure #1 (resultPtr=<unavailable>, key=<unavailable>, resultPtr=0x0000000000000000, key=<unavailable>) -> () in llbuildSwift.BuildEngine.build(key: llbuildSwift.Key) -> llbuildSwift.Value at CoreBindings.swift:407:17 [opt]
    frame #15: 0x00005555559ed02c swiftc`BuildEngine.build(key:) [inlined] reabstraction thunk helper from @callee_guaranteed (@unowned Swift.UnsafeMutablePointer<__C.llb_data_t_>) -> () to @escaping @callee_guaranteed (@unowned Swift.UnsafeMutablePointer<__C.llb_data_t_>) -> (@out (), @error @out Swift.Never) at <compiler-generated>:0 [opt]
    frame #16: 0x00005555559ed02c swiftc`BuildEngine.build(key:) [inlined] generic specialization <__C.llb_data_t_, Swift.Never, ()> of Swift.withUnsafeMutablePointer<τ_0_0, τ_0_1, τ_0_2 where τ_0_1: Swift.Error, τ_0_0: ~Swift.Copyable, τ_0_2: ~Swift.Copyable>(to: inout τ_0_0, _: (Swift.UnsafeMutablePointer<τ_0_0>) throws(τ_0_1) -> τ_0_2) throws(τ_0_1) -> τ_0_2 at <compiler-generated>:0 [opt]
    frame #17: 0x00005555559ed02c swiftc`BuildEngine.build(key:) at CoreBindings.swift:105:9 [opt]
    frame #18: 0x00005555559ed025 swiftc`BuildEngine.build(key=<unavailable>) at CoreBindings.swift:406:22 [opt]
    frame #19: 0x00005555557f25fc swiftc`specialized LLBuildEngine.build<A>(key=SwiftDriverExecution.ExecuteAllJobsRule.RuleKey @ scalar) at llbuild.swift:97:24 [opt]
    frame #20: 0x00005555557fa242 swiftc`MultiJobExecutor.execute(env=<unavailable>, fileSystem=TSCBasic.LocalFileSystem @ 0x0000555555cb3800) at MultiJobExecutor.swift:305:29 [opt]
    frame #21: 0x00005555557fb7df swiftc`SwiftDriverExecutor.execute(workload=<unavailable>, delegate=<unavailable>, numParallelJobs=<unavailable>, forceResponseFiles=<unavailable>, recordedInputModificationDates=0 key/value pairs) at SwiftDriverExecutor.swift:88:25 [opt]
    frame #22: 0x00005555557fa7b0 swiftc`protocol witness for DriverExecutor.execute(workload:delegate:numParallelJobs:forceResponseFiles:recordedInputModificationDates:) in conformance SwiftDriverExecutor at <compiler-generated>:0 [opt]
    frame #23: 0x000055555568f406 swiftc`Driver.performTheBuild(allJobs=2 values, jobExecutionDelegate=0x0000555555d3ad30, forceResponseFiles=false) at Driver.swift:1686:18 [opt]
    frame #24: 0x00005555556c0711 swiftc`Driver.run(jobs=2 values) at Driver.swift:1622:13 [opt]
    frame #25: 0x0000555555a76174 swiftc`swift_driver_main at main.swift:139:14 [opt]
    frame #26: 0x00007ffff61a3d90 libc.so.6`__libc_start_call_main(main=(swiftc`swift_driver_main at main.swift), argc=2, argv=0x00007fffffffe3b8) at libc_start_call_main.h:58:16
    frame #27: 0x00007ffff61a3e40 libc.so.6`__libc_start_main_impl(main=(swiftc`swift_driver_main at main.swift), argc=2, argv=0x00007fffffffe3b8, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffe3a8) at libc-start.c:392:3
    frame #28: 0x00005555555e4a65 swiftc`_start + 37


~/swift-6.0.1-RELEASE-ubuntu22.04/usr/bin/swiftc --version
Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions