Skip to content

[SR-15133] Crash when deallocating a never-resumed DispatchSourceTimer #604

Closed
@mickeyl

Description

@mickeyl
Previous ID SR-15133
Radar rdar://problem/82535083
Original Reporter @mickeyl
Type Bug
Environment

macOS 12 beta, Xcode 13 (13A233).

Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug, DispatchSourceTimer
Assignee None
Priority Medium

md5: 61e077b082169a945b058843ee5c3245

Issue Description:

Please consider the following example program which I have uploaded to

https://github.com/mickeyl/swift-bugs/tree/main/SR15133

Running it from within Xcode crashes with the following backtrace:

(lldb) bt

I suspect there is a memory management problem when the stored continuation in the `StreamCommand` gets deallocated due to `self.activeCommand = nil` while the continuation may continue to run in another task.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions