Add asserts to AwaitAllWaitHandle destructor
commit9ea32f81e128ee877d53193365ca9ea38a63ba3c
authorJan Oravec <jan@fb.com>
Thu, 3 Mar 2022 20:02:45 +0000 (3 12:02 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 3 Mar 2022 20:02:45 +0000 (3 12:02 -0800)
tree7e1a694502e42dd38239cff9af70d55381fb3123
parentedb86e1219a75de917cc888c98211d75664c8850
Add asserts to AwaitAllWaitHandle destructor

Summary:
Debugging one of the AsioBlockableChain::exitContext() segfault core, it is
apparent from refcounts that an AwaitAllWaitHandle object was freed, while one
of its children was not yet finished. At the same time, the AAWH was not
removed from that child's parent chain.

Let's add an assert that will hopefully fire and point to the erroneous decref.

Reviewed By: alexeyt, mofarrell

Differential Revision: D34590208

fbshipit-source-id: 95467d00bb572a9c91261b1087a09c5b0d92ece3
hphp/runtime/ext/asio/ext_await-all-wait-handle.h