Skip to content

Conversation

karzhenkov
Copy link

Resolves #25.

The crash is caused by stack overflow. Coroutine contnuations can be nested, and the depth of nesting can exceed the available stack space. Such a nesting occurs if async_auto_reset_event::set is called by startWaiter while some other startAwaiter coroutine is already awaiting on the event.

It's also possible to achieve strict nesting - for example, by activating startSignaller after all startWaiter calls are suspended in the co_await event. If the number of waiters is big enough, then the failure is likely to occur in all test configurations.

@karzhenkov
Copy link
Author

Almost all test configurations have a large depth of nested continuation calls (see, for example, here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On MSVC 2017, segfaults occur in test 37
1 participant