Skip to content

[SR-9863] Libdispatch's semaphores mishandle exits due to signals #623

Open
@swift-ci

Description

@swift-ci
Previous ID SR-9863
Radar rdar://problem/47791327
Original Reporter gmilos (JIRA User)
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug
Assignee ktopley-apple (JIRA)
Priority Medium

md5: e78b5ae6fce74b3d638d2adebfa603b3

Issue Description:

The attached reproduction shows how libdispatch semaphore crashes if the process is configured to receive a signal (non-default).

This is due to unguarded sem_wait:
https://github.com/apple/swift-corelibs-libdispatch/blob/dde58922492859d3664ee0bc296a26dee80ee369/src/shims/lock.c#L206

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