swift
69a2011f - [Concurrency] Fix null pointer dereference for task-to-thread model.

Commit
150 days ago
[Concurrency] Fix null pointer dereference for task-to-thread model. In task-to-thread concurrency mode, `_getMainExecutorAsSerialExecutor` returns `SerialExecutorRef::generic()`, which is, give or take, NULL. Unfortunately we'd declared it as returning `any SerialExecutor`, rather than `(any SerialExecutor)?`, and then the `getMainExecutor()` function was calling `asUnownedSerialExecutor()` on it, which then crashes. rdar://153152063
Author
Parents
Loading